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!
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 versteckter 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 versteckter Link
I'll let you test it from your side too and let me know if it is still not working.
Jamal, Can I use this on any form? Thanks!
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.
My issue is resolved now. Thank you!