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
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.
Thank you. I will ask my developer about this.