woocommerce_order_before_calculate_totals action-hookWC 2.2

Calculate totals by looking at the contents of the order. Stores the totals and returns the orders final total.

Usage

add_action( 'woocommerce_order_before_calculate_totals', 'wp_kama_woocommerce_order_before_calculate_totals_action', 10, 2 );

/**
 * Function for `woocommerce_order_before_calculate_totals` action-hook.
 * 
 * @param bool $and_taxes Calc taxes if true.
 * @param      $that      
 *
 * @return void
 */
function wp_kama_woocommerce_order_before_calculate_totals_action( $and_taxes, $that ){

	// action...
}
$and_taxes(true|false)
Calc taxes if true.
$that
-

Changelog

Since 2.2 Introduced.

Where the hook is called

WC_Abstract_Order::calculate_totals()
woocommerce_order_before_calculate_totals
woocommerce/includes/abstracts/abstract-wc-order.php 1914
do_action( 'woocommerce_order_before_calculate_totals', $and_taxes, $this );

Where the hook is used in WooCommerce

Usage not found.