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.