woocommerce_variable_product_taxes_influence_price filter-hookWC 10.9.0

Filters whether taxes influence the displayed price of a variable product.

Return true from this filter to force separate cache entries for the two variants. This is needed when an extension produces displayed prices that differ from raw prices independently of the standard tax calculation, for example when computing per-country prices for locations that have no configured tax rates.

Usage

add_filter( 'woocommerce_variable_product_taxes_influence_price', 'wp_kama_woocommerce_variable_product_taxes_influence_price_filter', 10, 2 );

/**
 * Function for `woocommerce_variable_product_taxes_influence_price` filter-hook.
 * 
 * @param bool       $taxes_influence_price Default decision based on product taxability and configured tax rates.
 * @param WC_Product $product               The variable product being evaluated.
 *
 * @return bool
 */
function wp_kama_woocommerce_variable_product_taxes_influence_price_filter( $taxes_influence_price, $product ){

	// filter...
	return $taxes_influence_price;
}
$taxes_influence_price(true|false)
Default decision based on product taxability and configured tax rates.
$product(WC_Product)
The variable product being evaluated.

Changelog

Since 10.9.0 Introduced.

Where the hook is called

WC_Product_Variable_Data_Store_CPT::taxes_influence_price()
woocommerce_variable_product_taxes_influence_price
woocommerce/includes/data-stores/class-wc-product-variable-data-store-cpt.php 599
return (bool) apply_filters( 'woocommerce_variable_product_taxes_influence_price', $taxes_influence_price, $product );

Where the hook is used in WooCommerce

Usage not found.