Multi-Country Products Manager enables WooCommerce stores to manage products for up to 2 countries with manual pricing control and country-specific product availability.
Choose from 60+ predefined countries including:
* Major economies (US, UK, EU countries, Japan, China, India)
* ASEAN countries (Singapore, Malaysia, Thailand, Philippines)
* Middle East (UAE, Saudi Arabia, Qatar)
* Africa (Nigeria, South Africa, Kenya)
* And many more
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
This plugin uses the following external geolocation services to detect user’s country for automatic country switching:
IP-API
IPAPI.co
IPinfo.io
Note: The plugin attempts to use these services in sequence until successful country detection occurs. If all services fail, the default country (US) is used. User’s IP is transmitted only for determining the country code, and no personal information is stored on these external services.
The plugin follows a modular architecture:
`
multi-country-products-manager-for-woocommerce/
│
├── multi-country-products-manager-for-woocommerce.php # Main plugin bootstrap file
├── includes/
│ ├── class-mcpmwoo-core.php # Core plugin loader and initialization
│ ├── class-mcpmwoo-country.php # Country management (2-country limit)
│ ├── class-mcpmwoo-admin.php # Admin interface and settings
│ ├── class-mcpmwoo-product.php # Product pricing and filtering
│ ├── class-mcpmwoo-ajax.php # AJAX handlers for country switching
│ ├── class-mcpmwoo-hooks.php # WordPress/WooCommerce hooks
│ └── helpers.php # Helper functions
├── assets/
│ ├── css/
│ │ ├── mcpmwoo-admin.css # Admin styling
│ │ └── mcpmwoo-frontend.css # Frontend styling
│ └── js/
│ ├── mcpmwoo-dropdown.js # Country switching
│ └── mcpmwoo-multi-country.js # Admin functionality
└── languages/ # Translation files
└── multi-country-products-manager-for-woocommerce.pot # Translation template
`
MCPMWOO_Core: Main plugin loader and dependency manager
MCPMWOO_Country: Country data management (2-country limitation)
MCPMWOO_Admin: WordPress admin interface and settings
MCPMWOO_Product: Product-specific functionality and WooCommerce integration
MCPMWOO_Ajax: AJAX request handling
MCPMWOO_Hooks: WordPress and WooCommerce hooks registration
The plugin provides helper functions for developers:
`php
// Get current user’s country
$country = mcpmwoo_get_current_country();
// Check if product is available in a country
$available = mcpmwoo_is_product_available_in_country($product_id, ‘US’);
// Get country-specific price
$price = mcpmwoo_get_product_country_price($product_id, ‘GB’, ‘regular’);
// Get all countries (max 2)
$countries = mcpmwoo_get_countries();
`
The plugin provides hooks for customization:
mcpmwoo_before_country_switch – Action before country switchingmcpmwoo_after_country_switch – Action after country switchingmcpmwoo_country_currencies – Filter to modify available currencies