/** * Get the shop price of a product incl or excl tax, depending on the 'woocommerce_tax_display_shop' setting. * * @param WC_Product $product * @param double $price * @return double */ public function get_composited_product_price($product, $price = '') { if (!$price) { return $price; } if (wc_cp_tax_display_shop() === 'excl') { $product_price = $product->get_price_excluding_tax(1, $price); } else { $product_price = $product->get_price_including_tax(1, $price); } return $product_price; }
function wc_composite_tax_display_shop() { _deprecated_function('wc_composite_tax_display_shop()', '3.5.0', 'wc_cp_tax_display_shop()'); return wc_cp_tax_display_shop(); }