Updated on Mar 08, 2022


Returns option values from a setting name.

You can get any available options from WP SMS or WP SMS Pro or default WordPress as you want with this function.

As a default, it will be working with the WP SMS setting name.


wp_sms_get_option( $option_name, $pro = false, $setting_name = '' );
  • $option_name (string) (Required) The option name.
  • $pro (boolean) (Required) The SMS text message.
  • $setting_name (string) (Optional) The whole setting name that you want to get value from it.


// Get international_mobile option value from WP-SMS setting
wp_sms_get_option( 'international_mobile' );

// Get wc_mobile_field option value from WP-SMS-Pro setting
wp_sms_get_option( 'wc_mobile_field', true );

// Get option_name option value from custom setting
// The $pro parameter not important to be used as false or true
wp_sms_get_option( 'option_name', false, 'wps_wc_otp' );