Skip Navigation

[Resolved] How to charge expiration date extension for the post.

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by yosukeS 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1252461

Tell us what you are trying to do?

I would like to let my post author remind his or her post(s) expire soon(which originally created via CRED form with woocommerce charge feature with a set expiration date). And create a button to extend their post duration by paying extra fee when the expiration date is approaching.

Is there any documentation that you are following?

https://toolset.com/documentation/user-guides/automatic-post-expiration/?utm_source=credplugin&utm_campaign=cred&utm_medium=post-expiration-form-settings&utm_term=Check%20our%20documentation%20on%20post%20epiration

Is there a similar example that we can see?

No

What is the link to your site?

hidden link

#1252525

Hello,

There isn't such a built-in feature within Toolset Forms plugin yet, and it is already in our to-do list, our developers are working on it.

Currently, if you are familiar with PHP codes, you can try some custom codes, Toolset Forms plugin is using a custom field "_cred_post_expiration_time" to store the the expiration date.

Here are my suggestions:
1) You can setup a form for editing post
2) After user submit this form, redirect him to Woocommerce checkout page
3) After user complete the Woocommerce order, use action hook "cred_commerce_after_order_completed" to trigger a PHP function:
https://toolset.com/documentation/programmer-reference/cred-commerce-api/#cred_commerce_after_order_completed
in this PHP function, change the custom field "_cred_post_expiration_time" field value to new timestamp value.

#1264753

Thank you. I will ask my developer about this.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.