woocommerce_order_before_calculate_taxes
Calculate taxes for all line items and shipping, and store the totals and tax rows.
If by default the taxes are based on the shipping address and the current order doesn't have any, it would use the billing address rather than using the Shopping base location.
Will use the base country unless customer addresses are set.
Usage
add_action( 'woocommerce_order_before_calculate_taxes', 'wp_kama_woocommerce_order_before_calculate_taxes_action', 10, 2 ); /** * Function for `woocommerce_order_before_calculate_taxes` action-hook. * * @param array $args Added in 3.0.0 to pass things like location. * @param $that * * @return void */ function wp_kama_woocommerce_order_before_calculate_taxes_action( $args, $that ){ // action... }
- $args(array)
- Added in 3.0.0 to pass things like location.
- $that
- -
Where the hook is called
woocommerce_order_before_calculate_taxes
woocommerce/includes/abstracts/abstract-wc-order.php 1793
do_action( 'woocommerce_order_before_calculate_taxes', $args, $this );