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: ''
Return Return
(string)
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 ) ); }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |