Automattic\WooCommerce\StoreApi\Schemas\V1

ProductSchema::get_price_function_from_tax_display_mode │ protected │ WC 1.0

WooCommerce can return prices including or excluding tax; choose the correct method based on tax display mode.

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

Хуков нет.

Возвращает

string. Function name.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_price_function_from_tax_display_mode( $tax_display_mode );
$tax_display_mode(строка) (обязательный)
If returned prices are incl or excl of tax.

Код ProductSchema::get_price_function_from_tax_display_mode() WC 11.2.2

protected function get_price_function_from_tax_display_mode( $tax_display_mode ) {
	return TaxDisplayMode::INCLUSIVE === $tax_display_mode ? 'wc_get_price_including_tax' : 'wc_get_price_excluding_tax';
}