wsoe_formatted_price

Returns formatted price.

Description

wsoe_formatted_price( (number) $amount, $order_details ); 

Parameters (2)

0. $amount (number)
The amount.
1. $order_details
The order details.

Usage

  1. if ( !function_exists( 'wsoe_formatted_price' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-simply-order-export/lib/functions.php'; 
  3.  
  4. // The amount. 
  5. $amount = null; 
  6.  
  7. // The order details. 
  8. $order_details = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wsoe_formatted_price($amount, $order_details); 
  12.  

Defined (1)

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

/lib/functions.php  
  1. function wsoe_formatted_price( $amount, $order_details ) { 
  2.  
  3. if( is_a( $order_details, 'WC_Order' ) && apply_filters( 'wsoe_formatted_price', true ) ) { 
  4.  
  5. // Support for php versions older than PHP 5.4.0 
  6. if( !defined( 'ENT_HTML5' ) ) { 
  7. return strip_tags( html_entity_decode( wc_price( $amount , apply_filters( 'wsoe_formatted_price_args', array() ) ) ) ) ; 
  8. }else { 
  9. $charset = get_option('blog_charset'); 
  10. return strip_tags( html_entity_decode( wc_price( $amount , apply_filters( 'wsoe_formatted_price_args', array() ) ), ENT_HTML5, $charset ) ) ; 
  11.  
  12. return $amount;