Hi,
Please add this code to your child theme’s functions.php –
add_action( 'after_wcfm_notification', function( $author_id, $message_to, $author_is_admin, $author_is_vendor, $wcfm_messages, $message_type ) {
global $WCFM, $WCFMmp, $wpsms_option, $sms;
if( !class_exists( 'WP_SMS_Plugin' ) ) return;
if( $message_to == -1 || $message_to == '-1' ) return;
$message_to = absint($message_to);
if( $message_to ) $message_to_user = 'vendor';
else $message_to_user = 'admin';
$is_notification_send = isset( $WCFMmp->wcfmmp_notification_options[$message_type][$message_to_user]['sms'] ) ? $WCFMmp->wcfmmp_notification_options[$message_type][$message_to_user]['sms'] : 'no';
if( $is_notification_send == 'yes' ) return;
$sms_messages = get_bloginfo( 'name' ) . ': ' . $wcfm_messages;
$sms_messages = esc_sql( $sms_messages );
$sms_messages = strip_tags( $sms_messages );
if( $message_to_user == 'vendor' ) {
$store_user = wcfmmp_get_store( $message_to );
$sms->to = array( $store_user->get_phone() );
} else {
$sms->to = array( $wpsms_option['admin_mobile_number'] );
}
$sms->msg = $sms_messages;
$sms->SendSMS();
}, 50, 6 );
Thank You