Automattic\WooCommerce\StoreApi\Utilities

ProductQuery::adjust_price_filters_for_displayed_taxes()protectedWC 1.0

If price filters need adjustment to work with displayed taxes, this returns true.

This logic is used when prices are stored in the database differently to how they are being displayed, with regards to taxes.

Метод класса: ProductQuery{}

Хуков нет.

Возвращает

true|false.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->adjust_price_filters_for_displayed_taxes();

Код ProductQuery::adjust_price_filters_for_displayed_taxes() WC 8.7.0

protected function adjust_price_filters_for_displayed_taxes() {
	$display  = get_option( 'woocommerce_tax_display_shop' );
	$database = wc_prices_include_tax() ? 'incl' : 'excl';

	return $display !== $database;
}