woocommerce_format_total

Formal total costs - format to the number of decimal places for the base currency.

Description

(string) woocommerce_format_total( (number) $number ); 

Returns (string)

Parameters (1)

0. $number (number)
The number.

Usage

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

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_format_total( $number ) { 
  2. wc_deprecated_function( __FUNCTION__, '2.1', 'wc_format_decimal()' ); 
  3. return wc_format_decimal( $number, wc_get_price_decimals(), false );