Problem with acf_frontend/save_post
-
Hello!
I have problems with acf_frontend/save_post. I tried the codesnippet which is shared in here: https://www.frontendform.com/acf_frontend-save_post/.
I don’t get any emails.
I tried to set some error logging to my function but there’s nothing in error log:
add_action('acf_frontend/save_post', 'my_acff_save_post', 10, 2); function my_acff_save_post( $form, $post_id ) { error_log(print_r("Hey there!",true)); //get important fields $post_content = get_post_field('post_content',$post_id); $post_title = get_post_field('post_title',$post_id); $email_address = get_field('email_address', $post_id); if( $email_address ) { $email_sent = wp_mail( $email_address, $post_title, $post_content ); } }
So it looks like the function doesn’t get executed.
Kindly,
Juuso
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem with acf_frontend/save_post’ is closed to new replies.