woocommerce_order_before_calculate_taxes хук-событиеWC 1.0

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.

Использование

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(массив)
Added in 3.0.0 to pass things like location.
$that
-

Где вызывается хук

WC_Abstract_Order::calculate_taxes()
woocommerce_order_before_calculate_taxes
woocommerce/includes/abstracts/abstract-wc-order.php 1613
do_action( 'woocommerce_order_before_calculate_taxes', $args, $this );

Где используется хук в WooCommerce

Использование не найдено.