Price inc VAT for EU

#57325
  • Resolved Nexusfred
    Rank Math free

    Hello,

    To comply European laws I must indicate all prices inc VAT.

    To do this, I tried your code

    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
        global $product;
        $entity['offers']['price'] = wc_get_price_including_tax( $product );
        return $entity;
    });

    This one doesn’t seem to work!
    The snippet preview on my product page still show the lowest price without VAT.

    In the same time I do not see how your code can get the price inc VAT when this one is different for each country (Spain 21%, France 20%, Germany 19%, Greece 24%…)

    It’s will be better to have an option in the setting dashboard to set a default VAT value.

    WP Super Cache = Disabled
    Autoptimize (CSS, JS, HTML) = Disabled

    Thanks

    • This topic was modified 4 years, 6 months ago by Nexusfred.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    It uses a WooCommerce function (https://docs.woocommerce.com/wc-apidocs/function-wc_get_price_including_tax.html) so you need to configure taxes on WooCommerce (as I suppose you have done). Since you won’t have the visitor location yet (since it is just a Google result, no one has entered yet), you have two options:

    • Display the price without taxes, since it depends on the country
    • Display the price with a default location tax by setting in WooCommerce the Default customer location’s setting (for example to β€œshop base address”)

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    both solutions are illegal in Europe. The shop must indicate on the product page the price including VAT depending on the country of the visitor.

    Beside your code crash all WordPress PAGE with the theme Porto.
    https://themeforest.net/item/porto-responsive-wordpress-ecommerce-theme/9207399

    Add an option to set a default VAT value will be better and legal.
    What is indicate on Google do not impact legally the shop. Posting a price on Google with a difference of 2% or 3% is not important but 20% is.

    However, setting a default VAT when the shop sells throughout Europe is illegal and can result in a fine of several thousand euros.

    You have a lot of questions about this problem, I hope you will update Rank Math with a better solution than add a PHP code to the function.php file.

    Best Regards

    Nexus ( who may have to re install YOAST πŸ™ )

    Todd
    Rank Math free

    Hello,

    There is a much easier solution for attaining that.

    Just enable the “price inclusive of tax” option in WooCommerce at WordPress Dashboard > WooCommerce > Settings > Tax

    That will get reflected in the Schema and the frontend.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Really ? Did you test your solution before answer my question?

    That not working at all.

    This show the price with all taxes in the shop but your plugin still use the price without taxes…

    Hello,

    Thank you for contacting Rank Math today.

    You can also use the option to to enter your prices inclusive of the tax in the shown settings. https://i.rankmath.com/iDb07k

    Looking forward to helping you. Thank you.

    ​​​​​​

    • This reply was modified 4 years, 6 months ago by Michael Davis.

    Hello Davis,

    Please read the full thread before reply. I’m in EU and sale to all EU countries, so I can’t enter the price with VAT because this one is different in each country.

    ….

    I think you need to learn a little more about European VAT policies if you want to build an international plugin.

    Right now your plugin is useless and illegal for European Woocommerce Store.

    Hello,

    Thank you for the follow up.

    Rank math takes the product pricing data as set in WooCommerce. The following is an example where the tax is set as included.

    img

    Please take time and read through this article to understand how to setup WooCommerce taxes.

    Looking forward to helping you. Thank you.

    ​​​​​​

    LOL! Very funny.

    Rank math takes the product pricing data as set in WooCommerce

    YESSSS but without the VAT, that is the issue here… Make a test on a Woocommerce and you will see by yourself.

    Reply fast it’s cool, but make some test about an issue before reply it’s better.

    Todd
    Rank Math free

    Hello,

    We are extremely sorry about that.

    It seems like one of the recent updates broke this feature and the VAT is no longer included in the Schema.

    We are checking this and we will have an update for you soon.

    We would really appreciate your patience in this matter.

    Todd
    Rank Math free

    Hi,

    We have checked this in more details and the code you have in the first post works.

    Here’s a screencast:
    https://i.rankmath.com/r0ZS7f

    Is that not working for you like that?

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)

The ticket ‘Price inc VAT for EU’ is closed to new replies.