Skip Navigation

[Resolved] How to disable email notification when post is set to draft mode

This support ticket is created 2 years, 6 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 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2365139

I have a housing directory. I've enabled auto-expiry for the posts (adds), which is 90 day after first publication. I've also setted up email notifications to be sent 60 days, 30 days and 15 days before expiration date.

My first problem is that even if the add is put on draft mode, the email notifications are still sent to the add owners. Is there a way to stop the emails notification or to auto-disabled expiry date when putting the post on draft mode?

My second problem is that I've setted up the post to be automatically translated when created (FR to EN). Therefore, add owners are receiving notification in double, one for the French post and one for the English post, even though the EN post is a perfect duplicate of FR one. Is there a way to set-up notification to be sent only once?

What is the link to your site?
hidden link

#2365641

Hello,

There isn't such kind of built-in features, you might consider custom codes, for example:
Use filter hook "cred_custom_notification_event_type_condition" to trigger a custom PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_custom_notification_event_type_condition
Check that specific post's status is draft, then return result false:
https://developer.wordpress.org/reference/functions/get_post_status/

For Q2) Same as above, you can use filter hook "cred_custom_notification_event_type_condition" to check if current post isn't a duplicated post, then return result true