public function get_product_subtotal($product, $quantity)
{
$price = $product->get_price();
$taxable = $product->is_taxable();
// Taxable
if ($taxable) {
if ('excl' === $this->tax_display_cart) {
$row_price = wc_get_price_excluding_tax($product, array('qty' => $quantity));
$product_subtotal = wc_price($row_price);
if ($this->prices_include_tax && $this->tax_total > 0) {
$product_subtotal .= ' <small class="tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>';
}
} else {
$row_price = wc_get_price_including_tax($product, array('qty' => $quantity));
$product_subtotal = wc_price($row_price);
if (!$this->prices_include_tax && $this->tax_total > 0) {
$product_subtotal .= ' <small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>';
}
}
// Non-taxable
} else {
$row_price = $price * $quantity;
$product_subtotal = wc_price($row_price);
}
return apply_filters('woocommerce_cart_product_subtotal', $product_subtotal, $product, $quantity, $this);
}