Skip Navigation

[Resolved] Can I programmatically change notification?

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.

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 6 months ago.

Assisted by: Minesh.

Author
Posts
#2699733

I am using a toolset CRED form for creating a custom post and then I would like to send a different email to the email recepient based on their registration status.

If email is registered --> send notification A
If email is not registered --> send notification B

How can I do that?

#2699786

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

What if you try to use the Toolset Form's hook "cred_notification_event_type"
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_event_type
Where:
- The "cred_notification_event_type" hook is used to register or define the custom notification event type.

Hook "cred_custom_notification_event_type_condition"
- https://toolset.com/documentation/programmer-reference/cred-api/#cred_custom_notification_event_type_condition
Where:
"cred_custom_notification_event_type_condition" hook is used during evaluation of a custom notification condition, when the event type is custom. It should be used in combination with the cred_notification_event_type hook.

Here is the related ticket that might help you:
- https://toolset.com/forums/topic/cred-form-notification-email-conditional-on-generic-field/#post-1158823

You can add your business logic and adjust the code added to the hook and check your custom field value.