wc_format_refund_total

Make a refund total negative.

Description

(float) wc_format_refund_total( (number) $amount ); 

Returns (float)

Parameters (1)

0. $amount (number)
The amount.

Usage

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

Defined (1)

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

/includes/wc-formatting-functions.php  
  1. function wc_format_refund_total( $amount ) { 
  2. return $amount * -1;