WooCommerce Multi-Currency & Inventory
Multi-currency pricing and multi-location inventory management for WooCommerce. Two independently toggleable modules that extend WooCommerce with enterprise-grade currency handling and warehouse-level stock tracking.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/towfique-elahe/woocommerce-multi-currency-inventory/archive/refs/heads/main.zipMulti-currency pricing and multi-location inventory management for WooCommerce. Two independently toggleable modules that extend WooCommerce with enterprise-grade currency handling and warehouse-level stock tracking.
Features
Multi-Currency Pricing
- Automatic exchange rate syncing from ECB, Open Exchange Rates, Fixer.io, or manual entry
- Per-product price overrides for any enabled currency
- Markup & rounding per currency (percentage markup, round/floor/ceil, charm pricing like $X.99)
- Geolocation-based currency detection (opt-in)
- Currency switcher available as a shortcode (
[wcmci_currency_switcher]), WordPress widget, or Gutenberg block - Cart, checkout & order conversion with full currency context stored on orders
- Payment gateway filtering by currency
- WooCommerce Blocks compatible (cart & checkout blocks)
Multi-Location Inventory
- Unlimited warehouse/store locations with address, priority, and shipping zone assignments
- Per-location stock tracking with bin/SKU, low-stock alerts, and reserved quantities
- Intelligent allocation engine with three strategies: priority-based, nearest location, or highest stock
- Stock reservations during checkout with configurable TTL and automatic expiry sweeper
- Split shipment support for multi-source fulfillment
- Full order lifecycle integration (allocate → reserve → commit → release/restock on refund)
- Immutable audit ledger recording every stock change with user, type, and notes
- Nightly reconciliation to detect drift between custom tables and WooCommerce core stock
- Inter-location stock transfers
Admin & Compliance
- Settings page under WooCommerce with 4 tabs (General, Currencies, Locations, Advanced)
- Currencies management page with rate sync controls
- Product-level metaboxes for per-currency prices and per-location inventory
- GDPR exporter and eraser for user currency preferences
- HPOS (High-Performance Order Storage) compatible
- Cache plugin compatibility (Cloudflare, Redis, WP Object Cache)
- Debug logging via WooCommerce logger
- Multisite support
Requirements
| Requirement | Version |
|---|---|
| PHP | >= 8.1 |
| WordPress | >= 6.4 |
| WooCommerce | >= 8.0 (tested up to 9.3) |
Installation
-
Download or clone this repository into your
wp-content/plugins/directory:cd wp-content/plugins/ git clone https://github.com/towfique-elahe/woocommerce-multi-currency-inventory.git -
Install dependencies:
cd woocommerce-multi-currency-inventory composer install npm install npm run build -
Activate the plugin through the WordPress admin or via WP-CLI:
wp plugin activate woocommerce-multi-currency-inventory -
Go to WooCommerce > Settings > Multi-Currency & Inventory to configure the plugin.
Configuration
Currency Module
- Navigate to WooCommerce > Settings > Multi-Currency & Inventory > Currencies
- Select a rate provider (ECB is free and works out of the box)
- Set the sync interval (hourly, twice daily, daily, or manual)
- Go to WooCommerce > Currencies to add and configure currencies with exchange rates, markup, and formatting
Inventory Module
- Navigate to WooCommerce > Settings > Multi-Currency & Inventory > Locations
- Choose an allocation strategy (priority, nearest, or highest stock)
- Configure reservation TTL and split shipment preferences
- Go to WooCommerce > Locations to create warehouse/store locations
Currency Switcher
Add the switcher to your storefront using any of these methods:
[wcmci_currency_switcher style="dropdown"]
[wcmci_currency_switcher style="list"]
Or use the Currency Switcher widget or Gutenberg block.
Database Tables
The plugin creates the following custom tables on activation:
| Table | Purpose |
|---|---|
wp_wcmci_currencies |
Currency configuration and rates |
wp_wcmci_product_prices |
Per-product per-currency price overrides |
wp_wcmci_rate_history |
Exchange rate change audit log |
wp_wcmci_locations |
Warehouse/store location metadata |
wp_wcmci_inventory |
Per-product per-location stock levels |
wp_wcmci_ledger |
Immutable stock change audit trail |
wp_wcmci_reservations |
Temporary stock holds during checkout |
wp_wcmci_transfers |
Inter-location stock transfers |
wp_wcmci_transfer_items |
Transfer line items |
wp_wcmci_location_zones |
Location-to-shipping-zone mappings |
All tables are removed on plugin uninstall.
Development
# Install dependencies
composer install
npm install
# Build assets
npm run build
# Watch mode
npm run start
# Linting
npm run lint:js
npm run lint:css
composer lint
composer lint:fix
# Tests
composer test
Project Structure
woocommerce-multi-currency-inventory/
├── woocommerce-multi-currency-inventory.php # Main plugin file
├── uninstall.php # Cleanup on uninstall
├── migrations/ # Database schema migrations
├── src/
│ ├── Core/ # Plugin bootstrap, activator, logger, migrations
│ ├── Currency/ # Currency resolution, conversion, rate providers, switcher
│ ├── Inventory/ # Stock manager, allocation engine, reservations, ledger
│ ├── Admin/ # Settings pages, product metaboxes, analytics
│ ├── Blocks/ # WooCommerce Blocks integration
│ ├── Compat/ # HPOS and cache plugin compatibility
│ └── Privacy/ # GDPR data exporter and eraser
├── assets/
│ ├── src/ # Source JS and CSS
│ └── build/ # Compiled assets (generated)
├── templates/ # Template overrides (reserved)
├── languages/ # Translation files
└── tests/ # PHPUnit tests
Hooks & Extensibility
Filters
| Filter | Description |
|---|---|
wcmci_rate_providers |
Register custom exchange rate providers |
wcmci_country_currency_map |
Customize geolocation-to-currency mappings |
woocommerce_get_sections_wcmci |
Add custom settings tabs |
woocommerce_get_settings_wcmci |
Add custom settings fields |
Actions
| Action | Description |
|---|---|
wcmci_sync_exchange_rates |
Triggered on scheduled rate sync |
wcmci_project_stock |
Sync aggregate stock to WooCommerce core |
wcmci_sweep_expired_reservations |
Hourly cleanup of expired reservations |
wcmci_reconcile_stock |
Nightly stock drift detection |
Uninstall
On uninstall, the plugin removes all custom database tables, plugin options, user meta, transients, and order meta. Multisite installations are cleaned up on a per-site basis.
License
This project is licensed under the MIT License.