I’m trying to add a welcome message to my site with the code listed in the documentation:
add_action( 'user_register', 'fep_cus_user_register_send_messaage', 10, 1 );
function fep_cus_user_register_send_messaage( $user_id ){
if ( $user_id < 1 )
return;
if ( ! function_exists( 'fep_send_message' ) )
return;
// Prepare message data
$message = array(
'message_title' => 'Welcome to Str8 Boy Whisperer' . fep_get_userdata( $user_id, 'display_name', 'id' ), //change with message title
'message_content' => 'Hey babe 🥰 Just wanted to say thanks for following me, I appreciate it 😘
Where did you find out about me? x', //change with message content
'message_to_id' => $user_id
);
$override = array(
'mgs_author' => 1, //change with message sender id
);
// Send message
fep_send_message( $message, $override );
}
However, I get this error:
“Your PHP code changes were rolled back due to an error on line 0 of file Unknown. Please fix and try saving again.
Exception thrown without a stack frame”
Do you know what’s happening here?