woocommerce_get_formatted_order_total filter-hookWC 1.0

Filter WooCommerce formatted order total.

Usage

add_filter( 'woocommerce_get_formatted_order_total', 'wp_kama_woocommerce_get_formatted_order_total_filter', 10, 4 );

/**
 * Function for `woocommerce_get_formatted_order_total` filter-hook.
 * 
 * @param string   $formatted_total  Total to display.
 * @param WC_Order $order            Order data.
 * @param string   $tax_display      Type of tax display.
 * @param bool     $display_refunded If should include refunded value.
 *
 * @return string
 */
function wp_kama_woocommerce_get_formatted_order_total_filter( $formatted_total, $order, $tax_display, $display_refunded ){

	// filter...
	return $formatted_total;
}
$formatted_total(string)
Total to display.
$order(WC_Order)
Order data.
$tax_display(string)
Type of tax display.
$display_refunded(true|false)
If should include refunded value.

Where the hook is called

WC_Order::get_formatted_order_total()
woocommerce_get_formatted_order_total
WC_Abstract_Order::get_formatted_order_total()
woocommerce_get_formatted_order_total
woocommerce/includes/class-wc-order.php 196
return apply_filters( 'woocommerce_get_formatted_order_total', $formatted_total, $this, $tax_display, $display_refunded );
woocommerce/includes/abstracts/abstract-wc-order.php 1972
return apply_filters( 'woocommerce_get_formatted_order_total', $formatted_total, $this );

Where the hook is used in WooCommerce

Usage not found.