Skip Navigation

[Résolu] Send CRED notification to user in select custom field

This support ticket is created Il y a 2 années. 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.

This topic contains 19 réponses, has 2 voix.

Last updated by larryL Il y a 1 an et 11 mois.

Assigned support staff: Jamal.

Auteur
Publications
#1799095
Capture3.JPG

Hi Jamal,

So I added the function and unchecked the notification options but I didn't receive anything. Was I supposed to set any of these options?

Thanks!

#1801445

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I think that the issue came from another code in the child's theme functions.php. You have used "$user_ID" instead of "$user_id". Check this screenshot hidden link

I fixed that part of code. Then I installed the "WP Mail Logging" to be able to catch the sent emails, and I run a test. The email has been sent to the selected user in the field "user id". Check this screenshot hidden link

I'll let you test it from your side too and let me know if it is still not working.

#1802459

Jamal, Can I use this on any form? Thanks!

#1802675

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Note that this code will only execute for the form with ID 8755/ Check line 3:

  if ( $form_id == 8755 ) {

If you want to use this code on another form, let's say with ID 9999 and form with ID 8888, you will need to adapt this line, you may use:

if ( in_array( $form_id, array(8755, 8888, 9999) ) ) {

The forms need to have the field "user id"(slug; wpcf-user-id). And it should work for them too.

If you encounter issues with another form and you need help, please open a new ticket. You can ask to assign it directly to me if you want.

#1803925

My issue is resolved now. Thank you!