wp_sms_get_option()

Description

Returns option values from a setting name.

With this function, you can get any available options from WP-SMS or WP-SMS-Pro or default WordPress as you want.

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

 

Parameters

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.

 

Example

// 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' );