- This topic has 9 replies, 2 voices, and was last updated 2 months, 2 weeks ago by .
-
Topic
-
I need to set up an email notification that goes to my client when someone submits a form from the frontend, but I keep getting errors. Could you walk me through the steps. I was using this from the documentation, and adding my meta box in the brackets.
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { if ( 'my-meta-box' === $config['id'] ) { wp_mail( 'admin@domain.com', 'New submission', 'A new post has been just submitted.' ); wp_safe_redirect( 'thank-you' ); die; } }, 10, 2 );
But I get this error:
Parse error: syntax error, unexpected 'add_action' (T_STRING), expecting function (T_FUNCTION) in /nfs/c12/h07/mnt/220007/domains/devseek.minnesotaee.org/html/wp-content/plugins/mb-frontend-submission/src/Form.php on line 152
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.