Automattic\WooCommerce\StoreApi\Schemas\V1
ProductSchema::get_price_function_from_tax_display_mode()
WooCommerce can return prices including or excluding tax; choose the correct method based on tax display mode.
Method of the class: ProductSchema{}
No Hooks.
Return
String
. Function name.
Usage
// protected - for code of main (parent) or child class $result = $this->get_price_function_from_tax_display_mode( $tax_display_mode );
- $tax_display_mode(string) (required)
- If returned prices are incl or excl of tax.
ProductSchema::get_price_function_from_tax_display_mode() ProductSchema::get price function from tax display mode code WC 9.3.3
protected function get_price_function_from_tax_display_mode( $tax_display_mode ) { return 'incl' === $tax_display_mode ? 'wc_get_price_including_tax' : 'wc_get_price_excluding_tax'; }