wc_format_phone_number

Format_phone function.

Description

(string) wc_format_phone_number( (mixed) $tel ); 

Returns (string)

Parameters (1)

0. $tel (mixed)
The tel.

Usage

  1. if ( !function_exists( 'wc_format_phone_number' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-formatting-functions.php'; 
  3.  
  4. // The tel. 
  5. $tel = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_format_phone_number($tel); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-formatting-functions.php  
  1. function wc_format_phone_number( $tel ) { 
  2. return str_replace( '.', '-', $tel );