Automattic\WooCommerce\Blocks

QueryFilters::adjust_price_filters_for_displayed_taxes()privateWC 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.

Method of the class: QueryFilters{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->adjust_price_filters_for_displayed_taxes();

QueryFilters::adjust_price_filters_for_displayed_taxes() code WC 8.9.0

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

	return $display !== $database;
}