• Resolved redanser

    (@redanser)


    A client complained that after adding a digital product to her cart, the cart showed a different price than the product page. She sent a screenshot showing that on the product page, no VAT was added, but the cart on top of the page did show the price incl. taxes.

    I myself cannot recreate this problem, as VAT is correctly added also on the product page (we show prices incl. VAT), but it must happen sometimes, as proven by the screenshot.

    Any idea where this bug comes from and how to fix it?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’ve had the same issue today and have had to de-activate the plugin. The prices on the website suddenly started being displayed with no VAT.

    Plugin Author David Anderson

    (@davidanderson)

    For WooCommerce to be able to show the price including tax, it has to know the visitor’s country.

    Usually to achieve that you use the ‘Geolocate’ option in WooCommerce settings; see: https://snag.gy/yKWhDA.jpg

    If that’s no longer working, then presumably your WooCommerce install is having trouble with the lookups. (This plugin just asks WooCommerce for its decision). If your website is behind Cloudflare, one thing you can do is turn on Cloudflare’s “country” header in your Cloudflare options, and that will be used, which will bypass any problem in WooCommerce.

    Also, make sure you are not caching product pages. That’s not compatible with pricing that depends on the visitor location.

    David

    Thanks David!

    Geolocate is activated in our settings.

    Caching must be the issue, we’re going to adjust the caching not to include the product pages and the info on Cloudfare is very useful as we’re about to start using that. We currently use KeyCDN – do you now if there is any settings to keep in mind with this CDN?

    Thanks for getting back on this – much appreciated.

    Thread Starter redanser

    (@redanser)

    There’s no caching, the Geolocate-setting is and has always been on and the little ‘cart’ widget on top of the page does manage to find the location and does add the correct VAT, so I feel like there might be another problem?

    Is there a way to set a default location if WP does not manage to find one? Then I can set it to Belgium as most of our clients are Belgian, and then we’d have less problems.

    Plugin Author David Anderson

    (@davidanderson)

    Hi Gary,

    As I say, the most likely cause is that whatever mechanism WooCommerce on your site is using internally (internally, it carries a number of different possibilities) for performing country look-ups, is failing. This plugin (EU VAT) doesn’t do the look-ups itself; it just asks WooCommerce for what it thinks (unless you’re on Cloudflare and have activated Cloudflare’s country header feature), and responds to that. If this hunch is right, then what is happening for you is that sometimes that look-up fails, i.e. returns an “unknown country” result, resulting in no VAT being added for that country (because there’s no country identified). But to investigate that, you’ll need to get someone with PHP skills to look into the innards at first hand. Having said that, it would be useful if there was a way of accessing that result more easily, and I’m adding something to our to-do list for that.

    David

    Plugin Author David Anderson

    (@davidanderson)

    In case it helps explain how things are plumbed together: the tax addition is also done by WooCommerce core. The part which our plugin supplies is advising WooCommerce as to which country to treat as the taxation country (the result of which comes from asking WooCommerce which country the visitor’s IP address represents).

    Plugin Author David Anderson

    (@davidanderson)

    For what it’s worth, the next plugin release will allow you to set a constant WC_EU_VAT_DEBUG in your wp-config.php ; if turned on, it’ll add an HTML comment in the HTML source indicating the results of country detection, and the method used to detect.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Conflict in shown price’ is closed to new replies.