• Resolved Mo

    (@nadhonar)


    Hi there, Thanks for developing.

    Apparently, WP SMS plugin has its own mobile number field, Is it possible to use the mobile number field of the Digits plugin instead of calling the mobile number from a new field?

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi,

    Thank you for reaching out.

    Yes, it is possible to use the mobile number field from the Digits plugin instead of the WP SMS plugin’s mobile number field. You can achieve this by utilizing the provided filter.

    Here’s how you can do it:

    1. Use the wp_sms_user_mobile_field filter to specify the mobile number field key from the Digits plugin.

    Add the following code to your theme’s functions.php file or a custom plugin:

    add_filter('wp_sms_user_mobile_field', function ($fieldKey) {
       return 'your_digits_mobile_key'; // Replace 'your_digits_mobile_key' with the actual meta key used by the Digits plugin
    });

    By doing this, the WP SMS plugin will retrieve the mobile number from the specified Digits plugin field.

    If you have any further questions or need additional assistance, please feel free to ask.

    Best,

    Thread Starter Mo

    (@nadhonar)

    Great! I really appreciate your detailed answer.

    1. I’ve tried the solution and It worked; the meta key of Digits is “digits_phone
    2. By adding this code, Digits mobile number of each user will be duplicated, in the other words a copy of Digits mobile phone number will be inserted in the mobile field of WP SMS. Right?
    3. In the stage of preparing the SMS to send > to WordPress’s Role > Select The Role I see the following message:
      1000 Users have the mobile number.
      But many more subscribers of my site have Digits mobile numbers, what does 1000 user mean here?

      Regards
    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Sounds good, thank you for replying.

    2. Yes, please set the Mobile Number Field Source in Settings to ‘Disable

    3. Please also set this filter, we temporary limited the total users to 1000 because of the performance but we already working in this for the next version to remove this issue.

    add_filter('wp_sms_mobile_numbers_query_args', function ($queryArgs) {
    $queryArgs['number'] = '-1';
    return $queryArgs;
    });
    Thread Starter Mo

    (@nadhonar)

    Awesome, Thanks for your great support.

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Your welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.