Tax is calculated only for logged in users on checkout page
-
Tax/VAT-field always shows zero at the checkout for users who are not logged in.
Although geolocalization works fine (it automatically fills the country/region field even for users who are not logged in).
Manually changing the billing country does not automatically update the tax rate either (it still always shows zero), even though this also works fine for users who are logged in.
I calculate taxes based on customer billing address. I have a lot of tax rates in my standard rates table (they are not overlapping). I display prices everywhere on my website excluding taxes.
I also have a plugin called “EU/UK VAT for WooCommerce”, which overwrites the tax rate to zero, if the customer adds their EU VAT number among the billing details. I cannot tell whether it works for unlogged users or not, because there is nothing to overwrite for them. But it works well for logged in users. And deactivating the plugin wont solve the problem either.
I’ve already tried:
– Deactivating all my plugins, and then activating them one by one
– Deleting cache, and disabling caching in the wp-config.php file
– Setting tax calculation based on shop base address (and on customer shipping address as well)
– Disabling geolocalization
– Making sure there is a wp_woocommerce_tax_rate_locations table in phpmyadminThank you for your help
The page I need help with: [log in to see the link]
-
Hi @andris007
Thanks for reaching out!
I understand that tax is not being calculated for guest users on your site, is that correct?
I replicated the scenario on my personal site, having two (2) tax rates for US: 20% and PH: 10%. I added an item to my cart and the tax is being calculated simultaneously for a guest user. It even varies when I change the billing address:
Image Link: https://snipboard.io/WSroHj.jpg
Can you please share with us a clear screenshot of the following:
– General Settings
– Tax Settings
– Tax ClassesIf you don’t already have a screenshot service installed, you can try https://snipboard.io or https://skitch.com/. You can share the direct link to the image as a response to this topic.
Furthermore, I’d like to understand your site properly, can you please share your System Status Report, that will help us further troubleshoot.
You can find it via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
. Once you’ve done that, you can paste it into your reply here.Thanks!
Hi, thanks for your reply
I understand that tax is not being calculated for guest users on your site, is that correct?
Yes.
Here are the screenshots:
General Settings:
https://snipboard.io/Mih4x3.jpg
https://snipboard.io/khd5zM.jpgTax Settings:
https://snipboard.io/bXuSzU.jpgTax Rates (standard – all my products belong here):
https://snipboard.io/5h7PG1.jpg
https://snipboard.io/Jzu9YB.jpg
https://snipboard.io/AXdVWB.jpg
https://snipboard.io/wACKYT.jpgTax Rates (zero):
https://snipboard.io/4f9uEL.jpgHere is the system status report:
### WordPress Environment ### WordPress address (URL): https://www.localcolor.one Site address (URL): https://www.localcolor.one WC Version: 7.1.0 REST API Version: ? 7.1.0 WC Blocks Version: ? 8.7.5 Action Scheduler Version: ? 3.4.0 Log Directory Writable: ? WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.33 PHP Post Max Size: 256 MB PHP Time Limit: 90 PHP Max Input Vars: 10000 cURL Version: 7.86.0 OpenSSL/1.1.1s SUHOSIN Installed: – MySQL Version: 5.7.40-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 7.1.0 WC Database Prefix: wp_ Total Database Size: 60.31MB Database Data Size: 55.14MB Database Index Size: 5.17MB wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 0.14MB + Index: 0.11MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_aioseo_cache: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wp_aioseo_notifications: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_aioseo_posts: Data: 0.05MB + Index: 0.02MB + Engine InnoDB wp_aryo_activity_log: Data: 0.25MB + Index: 0.00MB + Engine InnoDB wp_cky_banners: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cky_cookies: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cky_cookie_categories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_e_events: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 5.06MB + Index: 0.14MB + Engine InnoDB wp_postmeta: Data: 15.50MB + Index: 0.59MB + Engine InnoDB wp_posts: Data: 12.45MB + Index: 0.28MB + Engine InnoDB wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_trp_dictionary_en_us_hu_hu: Data: 0.09MB + Index: 0.08MB + Engine InnoDB wp_trp_gettext_en_us: Data: 1.52MB + Index: 0.61MB + Engine InnoDB wp_trp_gettext_hu_hu: Data: 1.52MB + Index: 0.56MB + Engine InnoDB wp_trp_gettext_original_meta: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_trp_gettext_original_strings: Data: 0.47MB + Index: 0.36MB + Engine InnoDB wp_trp_original_meta: Data: 0.06MB + Index: 0.08MB + Engine InnoDB wp_trp_original_strings: Data: 0.06MB + Index: 0.05MB + Engine InnoDB wp_ups_shipping_accessorial: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_account: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_config: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_delivery_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_fallback_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_license: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_logs_api: Data: 0.48MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_log_frontend: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_orders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_package_default: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_product_dimension: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_retry_api: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_services: Data: 0.11MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_shipments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ups_shipping_tracking: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfblockediplog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfconfig: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilemods: Data: 10.52MB + Index: 0.00MB + Engine InnoDB wp_wfhits: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfknownfilelist: Data: 4.52MB + Index: 0.00MB + Engine InnoDB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wflogins: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfstatus: Data: 0.14MB + Index: 0.09MB + Engine InnoDB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woo_shippment_provider: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wp_wotv_woo_track_info: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpr_rocket_cache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wpr_rucss_used_css: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_yoast_indexable: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB ### Post Type Counts ### attachment: 19 customize_changeset: 61 elementor_library: 3 elementskit_template: 4 language_switcher: 4 nav_menu_item: 11 page: 10 polylang_mo: 2 post: 1 product: 4 revision: 1157 shopengine-template: 6 shop_order: 3 wpforms: 1 wp_global_styles: 11 wp_navigation: 1 wp_template: 1 wp_template_part: 2 yay-currency-manage: 3 yith_wcan_preset: 2 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (24) ### Advanced Google reCAPTCHA: by WP Concern – 1.0.12 All in One SEO: by All in One SEO Team – 4.2.7.1 Antispam Bee: by pluginkollektiv – 2.11.1 Activity Log: by Activity Log Team – 2.8.5 CookieYes | GDPR Cookie Consent: by CookieYes – 3.0.6 DHL Shipping Germany for WooCommerce: by DHL – 3.2.1 GTM4WP: by Thomas Geiger – 1.16.2 Elementor: by Elementor.com – 3.8.1 ElementsKit Lite: by Wpmet – 2.7.5 Essential Addons for Elementor: by WPDeveloper – 5.4.4 EU/UK VAT for WooCommerce: by WPWhale – 2.8.4 Filter Everything?— WooCoomerce Product & WordPress Filter: by Andrii Stepasiuk – 1.7.1 Site Kit by Google: by Google – 1.88.0 Maintenance: by WebFactory Ltd – 4.07 One Stop Shop for WooCommerce: by vendidero – 1.3.3 ShopEngine: by Wpmet – 3.0.0 TranslatePress - Multilingual: by Cozmoslabs Razvan Mocanu Madalin Ungureanu Cristophor Hurduban – 2.4.2 UPS Shipping and UPS Access Point? : Official Plugin: by UPS – 3.4.2 WooCommerce Stripe Gateway: by WooCommerce – 7.0.1 WP Menu Cart: by WP Overnight – 2.12.1 WooCommerce Multilingual & Multicurrency: by OnTheGoSystems – 5.0.2 WooCommerce PayPal Payments: by WooCommerce – 2.0.0 WooCommerce: by Automattic – 7.1.0 Wordfence Security: by Wordfence – 7.8.0 ### Inactive Plugins (6) ### Autoptimize: by Frank Goossens (futtta) – 3.1.3 Multi-Carrier Shipping Plugin for WooCommerce Basic: by PluginHive – 1.3.6 UPS (BASIC) WooCommerce Shipping: by PluginHive – 1.2.15 WP Rocket: by WP Media – 3.12.3.2 YITH Color and Label Variations for WooCommerce: by YITH – 1.25.1 YITH WooCommerce Product Add-ons & Extra Options: by YITH – 2.16.0 ### Dropin Plugins (1) ### advanced-cache.php: advanced-cache.php ### Settings ### API Enabled: – Force SSL: – Currency: HUF (Ft) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 0 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: – Enforce Approved Product Download Directories: ? ### WC Pages ### Shop base: #5 - / Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /account/ Terms and conditions: #1274 - /terms-conditions-policy/ ### Theme ### Name: Storefront Version: 4.2.0 Author URL: https://woocommerce.com/ Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ? ### Templates ### Overrides: – ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings Daily Cron: ? Next scheduled: 2022-12-02 10:05:59 +01:00 Options: ? Notes: 54 Onboarding: completed ### WooCommerce PayPal Payments ### Onboarded: ? Shop country code: HU WooCommerce currency supported: ? Advanced Card Processing available in country: – Pay Later messaging available in country: – Webhook status: – Vault enabled: ? Logging enabled: ? Reference Transactions: – Used PayPal Checkout plugin: – Tracking enabled: ? ### Action Scheduler ### Complete: 307 Oldest: 2022-11-02 13:08:18 +0100 Newest: 2022-12-01 15:06:13 +0100 Failed: 2 Oldest: 2022-10-29 11:00:19 +0200 Newest: 2022-10-29 11:24:25 +0200 Pending: 5 Oldest: 2022-12-01 15:21:13 +0100 Newest: 2022-12-02 04:02:32 +0100 ### Status report information ### Generated at: 2022-12-01 15:21:01 +01:00
Hello @andris007,
Thank you for sharing all these screenshots!
Comparing your system status report with the live version of your site, things are not lining up. I’m not sure if you made some changes since the reply was 3 days ago.
The checkout seems to be handled by Elementor as you can see in this screenshot, but in your report, these pages are handled by WooCommerce.
Checkout: #7 - /checkout/
Here’s what I recommend you do.
- – Create a new empty page with a unique name.
-
– Add the following shortcode to it with the default editor, not Elementor or any page builder
[woocommerce_checkout]
. - – Navigate to WooCommerce > Settings > Advance and assign the new page with the shortcode as the checkout page.
Link to image: https://d.pr/i/MBJEoOLet us know how it goes!
Hi,
Thank you for the suggestions,I’m not sure if you made some changes since the reply was 3 days ago.
I haven’t touched anything related to the checkout page.
(…) things are not lining up.
Since you can’t edit the woocommerce checkout page using elementor, I use a plugin called ‘ShopEngine’ which lets me to edit the checkout page with the elementor toolkit. I assume this is the reason, why it’s handled by both woocommerce and elementor.
I have tried the method you suggested, with a newly created checkout page, but I still have the same issue, VAT is only calculated for logged in users.
Then I disabled the ShopEngine checkout template, and I tried it again with the newly created checkout page, but again the same problem occurs.
Hi,
Thanks for the further info. I’m fairly certain it must be one of the plugins interfering with the tax setup. I also tried this with WooCommerce only, tried also with the “EU/UK VAT Manager for WooCommerce” plugin, but wasn’t able to replicate the same problem on my testing site.
At the same time, I can see on your site that the resulting VAT is always 0 and that WC sends back the 0 tax as a response to any change in the billing country. There are many places where a plugin (or custom code) can filter the tax calculation, so the only way to find out is to disable all the plugins, switch to the default checkout experience and start from there. Ideally, you would test this out on a staging site (see below). If this vanilla experience is still not working correctly on your site, then this needs a deeper look.
You can clone your site to a staging environment and perform tests without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free [WP Staging](https://www.ads-software.com/plugins/wp-staging/) plugin.
Hi,
Thanks very much.
I was able to fix it by deleting everything on the staging site.
It was a plugin issue after all.
- The topic ‘Tax is calculated only for logged in users on checkout page’ is closed to new replies.