Automated OSS tax handling and order total calculations during CSV imports — built with lean, custom code inside Allimport.
Industry: eCommerce / EU Retail Services Delivered: Custom plugin development, API integration, WooCommerce import automation, OSS tax compliance
Solving Tax Compliance for Imported WooCommerce Orders
The client’s WooCommerce store relied on WP All Import to handle bulk order imports from a third-party system. However, a critical limitation emerged: their CSV data lacked total order values and needed accurate, country-specific VAT deductions to comply with EU OSS (One-Stop Shop) regulations.
They approached me needing a custom-coded solution to calculate VAT and order totals on the fly — automatically and reliably — during the import process.
What Was Needed
A way to calculate and apply accurate EU tax rates to imported orders
Automation of VAT-inclusive order totals from incomplete CSV data
Compatibility with the Allimport plugin’s templating and field logic
A maintainable solution that avoided bloating the site with additional plugins
How I Helped
Bespoke Plugin for Tax Rate Syncing
To avoid slow or quota-limited API lookups during each import, I developed a lightweight plugin that queried VAT rates from the Vatstack API and cached them in the WordPress database. This provided fast, accurate lookups for use in the import function logic.
Custom Import Logic for WP All Import
Inside Allimport’s function editor, I added custom PHP logic to:
Strip VAT from product and shipping prices based on the shipping country
Map VAT rates to WooCommerce’s internal tax tables
Automatically recalculate order totals after import (previously a manual step)
Flexible & Future-Proof
When the client later confirmed that the Germanized plugin already maintained updated VAT rates, I adapted the code to use these instead — simplifying the stack while keeping the core functionality intact.
Results
Imported orders now correctly reflect gross, net, and tax amounts
OSS VAT logic applies automatically with no manual steps
No impact to regular orders — the customisation only applies to Allimport templates
Lightweight, well-documented code built for clarity and long-term maintainability
This project is a great example of how custom code and thoughtful planning can overcome plugin limitations — keeping performance lean while delivering regulatory compliance and peace of mind.
“Everything is running smoothly now, thank you so much for your excellent work! For future tasks and projects, I’ll definitely reach out to you again.“
— Denise H.
Tired of bloat and flashy nonsense? I build websites that work. That’s it.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.