Skip Navigation

[Resolved] Adjusting Date Field Automatically & Sending Reminder X Days Before Date

This support ticket is created 3 years, 3 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.

Our next available supporter will start replying to tickets in about 1.42 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 3 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2125857

Hi,

I have a cpt called Clients and a date field "Due Date". Each month I need to update their website on that day, for example the 30th of July, then the 30th of August, etc.

Two things I'm trying to do:

1) Have that Due Date field automatically adjust from July 30th, to August 30th, to September 30th... etc. So after July 30th passes, the Due Date field automatically changes to August 30th. I have a created a View table with all my clients details including the Due Date, this acts as a calendar of sorts to show me when I need to perform the updates each month.

2) I'd like to get a reminder email notification 1 day before the due date.

I've seen some other support topics kind of related to this, so I think it's possible, but I can't quite put it together myself.

Thanks.

Tim

#2125999

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You can set the post expiration to run the cron on monthly basis:
=> https://toolset.com/course-lesson/setting-up-automatic-post-expiration/

You will require to use the hook "cred_post_expiration_custom_actions" to update the field value from X to Y.
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_post_expiration_custom_actions
The above hook will run as per the post expiration set and you can adjust the field value from current to future date.

You can also setup email notification on post expiration:
- https://toolset.com/course-lesson/setting-up-automatic-post-expiration/#sending-email-notifications-when-posts-expire

I suggest you setup a test first and check how it goes.