Title: Mobile country code
Last modified: March 26, 2018

---

# Mobile country code

 *  Resolved [bobox](https://wordpress.org/support/users/bobox/)
 * (@bobox)
 * [8 years ago](https://wordpress.org/support/topic/mobile-country-code/)
 * To send an SMS to a mobile in australia I have to add the 61 country code to 
   the mobile number. All my users are in australia and the user’s number does not
   include the country code. How do I get WP-SMS to automatically add the 61 country
   code to outbound SMS?
 * There is a Mobile country code text box under General where I entered “61” but
   that does nothing.
 * Thanks
    Bob

Viewing 1 replies (of 1 total)

 *  Plugin Author [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * (@mostafas1990)
 * [8 years ago](https://wordpress.org/support/topic/mobile-country-code/#post-10122755)
 * Hey Bob,
 * It’s better you add this mobile country code in the gateway class file with Hook.
 * For example:
 *     ```
       <?php
       add_filter('wp_sms_to', function($numbers){
       	// Reformat number
       	$to = array();
       	foreach ( $numbers as $number ) {
       		if ( substr( $number, 0, 2 ) === "61" ) {
       			$number = substr( $number, 2 );
       			$number = '0061' . $number;
       		}
   
       		$to[] = $number;
       	}
   
       	return $to;
       })
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Mobile country code’ is closed to new replies.

 * ![](https://ps.w.org/wp-sms/assets/icon.svg?rev=3477319)
 * [WSMS (formerly WP SMS) – SMS & MMS Notifications with OTP and 2FA for WooCommerce](https://wordpress.org/plugins/wp-sms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-sms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-sms/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-sms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-sms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-sms/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/mobile-country-code/#post-10122755)
 * Status: resolved