woocommerce_adjust_non_base_location_prices filter-hookWC 1.0

The woocommerce_adjust_non_base_location_prices filter can stop base taxes being taken off when dealing with out of base locations.

  • e.g. If a product costs 10 including tax, all users will pay 10 regardless of location and taxes.
  • This feature is experimental @since 2.4.7 and may change in the future. Use at your risk.

Usage

add_filter( 'woocommerce_adjust_non_base_location_prices', 'wp_kama_woocommerce_adjust_non_base_location_prices_filter' );

/**
 * Function for `woocommerce_adjust_non_base_location_prices` filter-hook.
 * 
 * @param  $true 
 *
 * @return 
 */
function wp_kama_woocommerce_adjust_non_base_location_prices_filter( $true ){

	// filter...
	return $true;
}
$true
-

Where the hook is called

wc_get_price_including_tax()
woocommerce_adjust_non_base_location_prices
ProductQuery::adjust_price_filter_for_tax_class()
woocommerce_adjust_non_base_location_prices
ProductCollection::adjust_price_filter_for_tax_class()
woocommerce_adjust_non_base_location_prices
QueryFilters::adjust_price_filter_for_tax_class()
woocommerce_adjust_non_base_location_prices
wc_get_price_excluding_tax()
woocommerce_adjust_non_base_location_prices
WC_Cart_Totals::remove_item_base_taxes()
woocommerce_adjust_non_base_location_prices
WC_Cart_Totals::calculate_item_subtotals()
woocommerce_adjust_non_base_location_prices
woocommerce/includes/wc-product-functions.php 1042
} elseif ( $tax_rates !== $base_tax_rates && apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) {
woocommerce/src/StoreApi/Utilities/ProductQuery.php 523
$taxes = apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ? WC_Tax::calc_tax( $price_filter, $base_tax_rates, true ) : WC_Tax::calc_tax( $price_filter, $tax_rates, true );
woocommerce/src/Blocks/BlockTypes/ProductCollection.php 1270
$taxes = apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ? WC_Tax::calc_tax( $price_filter, $base_tax_rates, true ) : WC_Tax::calc_tax( $price_filter, $tax_rates, true );
woocommerce/src/Blocks/QueryFilters.php 383
$taxes = apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ? WC_Tax::calc_tax( $price_filter, $base_tax_rates, true ) : WC_Tax::calc_tax( $price_filter, $tax_rates, true );
woocommerce/includes/wc-product-functions.php 1027
$remove_taxes = apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ? WC_Tax::calc_tax( $line_price, $base_tax_rates, true ) : WC_Tax::calc_tax( $line_price, $tax_rates, true );
woocommerce/includes/wc-product-functions.php 1090
if ( apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) {
woocommerce/includes/class-wc-cart-totals.php 427
if ( apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ) {
woocommerce/includes/class-wc-cart-totals.php 722
$adjust_non_base_location_prices = apply_filters( 'woocommerce_adjust_non_base_location_prices', true );

Where the hook is used in WooCommerce

Usage not found.