50% OFF Limited time deal!

wp_sms_admin_notify_registration

Updated on Mar 13, 2021

Overview

This filter allows you to modify the admin receiver number when a new user registers in the WordPress

Example

add_filter('wp_sms_admin_notify_registration', 'modifyAdminReceiversUserRegisterNotification');

/**
 * @param $adminMobileNumber array
 * @return array
 */
function modifyAdminReceiversUserRegisterNotification($adminMobileNumber)
{
    $adminMobileNumber[] = 01222323233;
    $adminMobileNumber[] = 01222323234;

    return $adminMobileNumber;
}

If you’d like to send this notification to a specific group, then use this function body:

/**
 * @param $adminMobileNumber array
 * @return array
 */
function modifyAdminReceiversUserRegisterNotification($adminMobileNumber)
{
    $adminMobileNumber[] = \WP_SMS\Newsletter::getSubscribers(1); // Group ID

    return $adminMobileNumber;
}