woocommerce_order_before_calculate_totals
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
woocommerce_order_before_calculate_totals
woocommerce/includes/abstracts/abstract-wc-order.php 1994
do_action( 'woocommerce_order_before_calculate_totals', $and_taxes, $this );