• Resolved Tynael

    (@tynael)


    I’m trying to get the regular product price with tax included but I cannot find any WooCommerce function or variable with this purpose.

    To get the regular product price WITHOUT tax I’m using:

    $price = $product->get_regular_price();

    But how can I get the regular product price WITH tax included?

Viewing 1 replies (of 1 total)
  • Thread Starter Tynael

    (@tynael)

    For those who are looking for an answer to this question, I have found the solution:

    wc_get_price_including_tax( $product, array(‘price’ => $price ) );
    wc_get_price_including_tax( $product, array(‘price’ => $specialPrice ) );

    You need to add the price as the second argument to wc_get_price_including_tax()

Viewing 1 replies (of 1 total)
  • The topic ‘Get Regular Product Price with Tax’ is closed to new replies.