WordPress at Your Fingertips
function is not described


ProductSchema::get_tax_display_mode() protected WC 1.0

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

{} It's a method of the class: ProductSchema{}

No Hooks.


String. Valid tax display mode.


// protected - for code of main (parent) or child class
$result = $this->get_tax_display_mode( $tax_display_mode );
Provided tax display mode.
Default: ''

Code of ProductSchema::get_tax_display_mode() WC 5.8.0

protected function get_tax_display_mode( $tax_display_mode = '' ) {
	return in_array( $tax_display_mode, [ 'incl', 'excl' ], true ) ? $tax_display_mode : get_option( 'woocommerce_tax_display_shop' );