Warning: This method has been deprecated. Use wc_get_price_excluding_tax instead.

WC_Abstract_Legacy_Product::get_price_excluding_tax( int $qty = 1, string $price = '' )

Returns the price (excluding tax) – ignores tax_class filters since the price may *include* tax and thus needs subtracting.


Description Description

Uses store base tax rates. Can work for a specific $qty for more accurate taxes.


Parameters Parameters

$qty

(Optional)

Default value: 1

$price

(Optional) to calculate, left blank to just use get_price()

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/legacy/abstract-wc-legacy-product.php

	public function get_price_excluding_tax( $qty = 1, $price = '' ) {
		wc_deprecated_function( 'WC_Product::get_price_excluding_tax', '3.0', 'wc_get_price_excluding_tax' );
		return wc_get_price_excluding_tax( $this, array( 'qty' => $qty, 'price' => $price ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.