VAT Issue not calculated sometimes
-
Hello,
I’m experiencing the same problem that was raised in this thread by @trint:
https://ww.wp.xz.cn/support/topic/vat-issue-not-calculated-on-every-orders/The VAT is not included in the final price after a certain number of orders (approximately 10).
Our standard VAT rate is 19%, and it only applies to one product (which has 3 variants).This issue has been identified for various payment gateways.
The answer in the discussion above was to update WC, which was in Version 3.9 at the time. As you would guess, I’m at Version 7.0.0 and still experiencing this issue.
Anyone who faced it? Is there a fix for this?
-
Hi @infowiste
Thanks for reaching out!
I understand that the VAT is not being included in the final price after a certain number of orders.
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 reportand thenCopy for support. Once you’ve done that, you can paste it into your reply here.Furthermore, please provide the following details below for us to check this further:
– URL or link to your site
– Product that has VAT applied
– screenshot of your Tax Settings, Tax Classes (if any)If you don’t already have a screenshot service installed, you can try https://snipboard.io or http://skitch.com/. You can share the direct link to the image as a response to this topic.
Looking forward to hearing from you.
Hello @xue28,
thanks for your quick response.
This is WC status :### WordPress Environment ### WordPress address (URL): https://www.klap.tn Site address (URL): https://www.klap.tn WC Version: 7.0.0 REST API Version: ✔ 7.0.0 WC Blocks Version: ✔ 8.5.1 Action Scheduler Version: ✔ 3.4.0 Log Directory Writable: ✔ WP Version: ❌ 5.9.4 - There is a newer version of WordPress available (6.0.2) WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: fr_FR External object cache: – ### Server Environment ### Server Info: Apache/2.4.25 (Debian) OpenSSL/1.0.2u PHP Version: 8.1.1 PHP Post Max Size: 100 MB PHP Time Limit: 0 PHP Max Input Vars: 10000 cURL Version: 7.52.1 OpenSSL/1.0.2u SUHOSIN Installed: – MySQL Version: 5.7.32 Max Upload Size: 50 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 6.6.1 ... ### Post Type Counts ### acf-field: 11 acf-field-group: 4 attachment: 74 customize_changeset: 38 custom_css: 2 elementor_library: 14 feedback: 2 follow_up_email: 4 inspire_invoice: 272 jp_img_sitemap: 2 jp_sitemap: 2 jp_sitemap_master: 2 nav_menu_item: 11 oembed_cache: 41 page: 18 post: 2 product: 13 product_variation: 11 revision: 1313 shop_coupon: 10008 shop_order: 2921 shop_subscription: 1484 waef: 1 wpforms: 1 wp_global_styles: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (42) ### Advanced Custom Fields PRO: by Delicious Brains – 5.11.4 All in One SEO Pack: by All in One SEO Team – 4.2.6.1 BackUpWordPress: by XIBO Ltd – 3.13 PublishPress Capabilities: by PublishPress – 2.5.2 Code Snippets: by Code Snippets Pro – 3.2.1 Country Code Selector: by INTOLAP – 1.6 DynamicConditions: by RTO GmbH – 1.6.0 Elementor Pro: by Elementor.com – 3.5.2 Elementor: by Elementor.com – 3.7.8 Envato Elements: by Envato – 2.0.11 Facebook Chat Plugin - Live Chat Plugin for WordPress: by Meta – 2.5 Flexible Invoices for WooCommerce and WordPress: by WP Desk – 5.6.8 MonsterInsights - Google Analytics pour WordPress: by MonsterInsights – 8.9.1 ShareThis Dashboard for Google Analytics: by ShareThis – 3.1.1 GTranslate: by Translate AI Multilingual Solutions – 2.9.13 Header and Footer Scripts: by Digital Liberation – 2.2.1 HT Mega - Absolute Addons for Elementor Page Builder: by HasThemes – 1.9.6 iQ Block Country: by Pascal – 1.2.19 Jetpack: by Automattic – 11.4 JWT Authentication for WP-API: by Enrique Chavez – 1.2.6 Login as User: by Web357 – 1.4.2 Mailchimp for WooCommerce: by Mailchimp – 2.7.5 MC4WP : Mailchimp pour WordPress: by ibericode – 4.8.10 PayMaster Payment Gateway: by KLAP Team – 1.0 Performance Lab: by WordPress Performance Team – 1.5.0 TUNISIE SMS: by L2T – 21.02.05 Payment Gateway for ClicToPay on WooCommerce: by Khlil Turki – 1.0.2 Flouci Payment for WooCommerce: by Flouci – 1.0 WC Paymee Gateway: by Paymee – 1.4.0 RunPay Terminals Payment Gateway: by KLAP Team – 1.0 Checkout Field Editor for WooCommerce: by ThemeHigh – 1.7.2 WooCommerce Blocks: by Automattic – 7.8.0 Free Trial Coupon for Woocommerce Subscriptions: by Jahid – 1.0.1 Follow-Up Emails: by WooCommerce – 4.9.17 WooCommerce Google Analytics Integration: by WooCommerce – 1.5.15 WooCommerce Smart Coupons: by StoreApps – 5.1.0 Abonnements WooCommerce: by WooCommerce – 3.1.6 WooCommerce: by Automattic – 7.0.0 WP KLAP API: by Klap.tn – 1.0 WP Mail SMTP: by WPForms – 3.6.1 WP RUNPAY INTEGRATION API: by Klap Team – 1.0 WPForms Lite: by WPForms – 1.7.4.2 ### Inactive Plugins (6) ### Autoptimize: by Frank Goossens (futtta) – 3.1.2 Duplicator: by Snap Creek – 1.5.0 Email Verification / SMS verification / Mobile Verification: by miniOrange – 12.7 Package Cost Extra fee: by Amira – WooCommerce Edinar Payment Gateway: by Amira – 0.1 WooCommerce Edinar Payment Gateway: by Amira – ### Dropin Plugins (1) ### maintenance.php: maintenance.php ### Must Use Plugins (1) ### Elementor Safe Mode: by Elementor.com – 1.0.0 ### Settings ### API Enabled: – Force SSL: – Currency: TND (TND) Currency Position: right_space Thousand Separator: Decimal Separator: , Number of Decimals: 3 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) 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: ❌ Page not set Cart: #18 - /panier/ Checkout: #19 - /commande/ My account: #20 - /mon-compte/ Terms and conditions: #6647 - /cgv/ ### Theme ### Name: Klap Theme Version: 9.9.9 Author URL: https://www.klap.tn 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: ... ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://www.klap.tn Subscription Statuses: trash: 1 wc-active: 154 wc-pending: 192 wc-on-hold: 982 wc-cancelled: 155 WooCommerce Account Connected: ❌ No Report Cache Enabled: ✔ Yes Cache Update Failures: ✔ 0 failure ### Store Setup ### Country / State: Tunisia ### Subscriptions by Payment Gateway ### Credit Card using ClicToPay: trash: 1 wc-active: 54 wc-cancelled: 47 wc-on-hold: 102 wc-pending: 152 other: wc-active: 1 :: wc-active: 2 wc-cancelled: 5 wc-on-hold: 6 wc-pending: 7 :: wc-cancelled: 1 wc-on-hold: 11 Pay with Flouci: wc-active: 4 wc-cancelled: 5 wc-on-hold: 9 wc-pending: 25 Paymee: wc-active: 2 wc-cancelled: 1 wc-on-hold: 1 wc-pending: 8 ### Payment Gateway Support ### Credit Card using ClicToPay: products Pay with Flouci: products Paymee: products :: products :: products ### Admin ### ... Disabled Features: minified-js new-product-management-experience settings Daily Cron: ✔ Next scheduled: 2022-10-14 14:16:30 +01:00 Options: ✔ Notes: 34 Onboarding: completed ### Action Scheduler ### Complete: 4,081 Oldest: 2022-09-14 08:29:16 +0000 Newest: 2022-10-14 07:20:11 +0000 Failed: 2 Oldest: 2022-01-26 16:02:24 +0000 Newest: 2022-01-27 14:23:44 +0000 Pending: 231 Oldest: 2022-10-14 07:24:10 +0000 Newest: 2023-09-30 18:49:36 +0000 ### Status report information ### Generated at: 2022-10-14 08:20:12 +01:00– URL or link to your site
– Product that has VAT applied => one product with 3 variants:
V1 : ID = 7568 ; V2 : ID = 7569 ; V3 : ID = 7570 ;
– screenshot of your Tax Settings, Tax Classes
Tax options: https://snipboard.io/xJCUhB.jpg
Standard rate: https://snipboard.io/XtOkni.jpg
Tax class (parent): https://snipboard.io/nDdhGC.jpg
Tax class (child): https://snipboard.io/HzpR0f.jpgThanks for your help.
Hello,
Thanks for sending the system report.
As a first step, be sure to update your WordPress version.
WP Version: ❌ 5.9.4
To update WordPress securely please follow instructions on this web article.
### Database ###
WC Database Version: 6.6.1Then please update your database under WooCommerce > status > tools > update database.

Link to image: https://snipboard.io/GZklhr.jpgPlease correct me if I am wrong, I am assuming you would like a rate of 19% for the State of Tennessee? Correct?
If that is correct, go ahead and configure the tax rates by adding the country (US), then the state (TN).

Link to image: https://snipboard.io/zU8KOe.jpgDoes that make a difference? Let us know how it goes.
Hello @ihereira,
I appreciate your suggestions.
I’ll update WP and DB and let you know the outcomes.Please correct me if I am wrong, I am assuming you would like a rate of 19% for the State of Tennessee? Correct?
Unluckily, no. The country is Tunisia (TN).
Thanks.
Hi @infowiste
I’ll update WP and DB and let you know the outcomes.
Let us know how it goes afterwards!
Unluckily, no. The country is Tunisia (TN).
Meanwhile, thanks for sharing the screenshots and the SSR.
I replicated your settings on my end and the tax is calculated on my end as seen here:

Image Link: https://snipboard.io/YVkNE2.jpg
Meanwhile, I checked your site, however, I cannot find any products on your page, I can only see subscriptions here:

Image Link: https://snipboard.io/FxIePD.jpg
Would you be able to share the step-by-step flow that might help us identify any pain points?
WP core and WC DB have both been upgraded.
@xue28: I really want to explain how to reproduce the procedure that led to this bug, but it’s completely random and we can’t identify a pattern. For the third subscription, for example, only one was paid with no VAT for the last 10 orders; for the first, several times, sometimes after two orders and other times after more than twenty.Hi @infowiste
I understand that the scenario is completely random.
In this case, if you could check the past orders and compare them with others just to see if there are any patterns here?
You could also try to switch to the default Storefront theme and only WooCommerce plugin is enabled and reproduce again the same orders to see if the error still persists?
You could also create a staging site to troubleshoot the issue. I recommend using WP Staging plugin for this.
Let us know how it goes!
Hello @xue28,
Actually, we noticed a pattern with orders that did not include calculated VAT.
All relevant orders were created outside of Tunisia and one of our payment gateways provides country IP. The VAT was set up to only be used in Tunisia (now we’ve changed it).So, we believe that this issue has been resolved.
Thanks for your precious help.
The topic ‘VAT Issue not calculated sometimes’ is closed to new replies.