Region Manager WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Region Manager with integration with WooCommerce and Wordpress
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/jrg-code/region-manager/archive/refs/heads/main.zipRegion Manager for WooCommerce
A powerful WordPress plugin that enables multi-regional WooCommerce management with region-specific pricing, product availability, and order tracking.
Description
Region Manager transforms your WooCommerce store into a multi-regional powerhouse. Create separate regions with country-specific URLs, manage product availability and pricing per region, and track orders with advanced filtering and a custom "In Transit" order status.
Perfect for international stores, multi-country operations, or businesses targeting specific geographic markets.
Features
🌍 Region Management
- Unlimited Regions (Pro) / 2 Regions (Free)
- Country assignment with URL slugs (e.g.,
/pt/,/es/,/fr/) - Language code integration for translator plugins (WPML, Polylang, TranslatePress)
- Default country selection per region
- Active/Inactive status control
💰 Pricing & Availability
- Regional price overrides (regular and sale prices)
- Product availability control per region
- Bulk assign/remove products to/from regions
- Variable product support with variation-level pricing
- Automatic price filtering on frontend
🛒 Checkout & Orders
- Region detection from URL
- Cross-region purchase policies:
- Allow all purchases
- Add international shipping surcharge
- Block purchases outside region
- Custom "In Transit" order status (🚚)
- Region tracking in order meta
- Cross-region order detection and flagging
📊 Dashboard & Analytics
- Overview cards (Total Regions, Orders Today, Revenue Today, Products)
- Trend indicators (% change vs yesterday)
- Region performance breakdown
- Recent orders by region
- Orders by status visualization
🔗 URL & SEO
- Region-based URL structure (
example.com/pt/product/item) - Automatic URL rewriting and permalink handling
- Hreflang tag generation for SEO
- WooCommerce URL localization (cart, checkout, shop pages)
- Region switcher shortcode and widget
🎨 Frontend Components
- Region switcher with 3 display styles:
- Dropdown selector
- Link list
- Flag emoji buttons
- WordPress widget for sidebars
- Shortcode with customization options
🔧 Developer Features
- Action hooks for translator plugin integration
- Filter hooks for customization
- Comprehensive inline documentation
- Debug mode for troubleshooting
- WordPress Coding Standards compliant
Requirements
- WordPress 5.8 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
Creating the Plugin ZIP for WordPress
If you're downloading this from GitHub and want to install it on WordPress:
Method 1: GitHub Desktop (Recommended)
- Open the repository in GitHub Desktop
- Click "Show in Explorer" / "Show in Finder"
- Find the
region-managerfolder (NOT the root folder) - Right-click on the
region-managerfolder - Select "Compress" / "Send to > Compressed (zipped) folder"
- Upload the resulting
region-manager.zipto WordPress
Method 2: Manual Download
- Download the repository
- Open the downloaded folder
- Find the
region-managerfolder inside - Compress ONLY that folder (right-click → Compress)
- Upload to WordPress
⚠️ Important: Always compress the region-manager folder itself, not its contents. The ZIP file should contain a single folder named region-manager with all files inside.
Installation
Automatic Installation
- Download the plugin ZIP file
- Go to WordPress admin > Plugins > Add New
- Click "Upload Plugin" and select the ZIP file
- Click "Install Now" and then "Activate"
Manual Installation
- Upload the
region-managerfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to Region Manager > Settings to configure
Post-Installation
- Go to Region Manager > Settings
- Create your first region
- Add countries to the region
- Configure checkout settings
- Visit Settings > Permalinks to flush rewrite rules
Configuration
Creating Regions
-
Navigate to Settings
- Go to Region Manager > Settings > Regions tab
-
Add New Region
- Click "Add New Region" button
- Enter region name (e.g., "Western Europe", "North America")
- Enter URL slug (e.g., "eu", "us", "pt")
-
Add Countries
- Select countries from dropdown
- Set URL slug for each country (used in URLs)
- Set language code (e.g., "en", "pt", "es")
- Mark one country as default
-
Save Region
- Click "Save Region"
- Region is now active and ready to use
Configuring Checkout Settings
Navigate to Region Manager > Settings > Checkout Settings:
Cross-Region Purchase Policy:
- Allow: Customers can purchase from any region (default)
- Charge Extra: Add configurable surcharge for cross-region orders
- Block: Prevent checkout if shipping country doesn't match region
Extra Charge Amount: Set the international shipping surcharge (when using "Charge Extra")
Error Message: Customize the message shown when blocking cross-region purchases
Assigning Products to Regions
Individual Product:
- Go to Region Manager > Products
- Click "Edit Regions" on any product
- Check "Available in [Region Name]" for each region
- Optionally set price overrides
- For variable products, check "Apply to all variations"
- Save changes
Bulk Assignment:
- Go to Region Manager > Products
- Select multiple products (checkboxes)
- Choose "Assign to Region" from Bulk Actions
- Select target region
- Optionally set price overrides
- Click Apply
Managing Orders
Navigate to Region Manager > Orders:
Filtering:
- Filter by Region
- Filter by Status (Processing, In Transit, Completed, etc.)
- Filter by Date Range
- Search by Order # or Customer Name
Quick Actions:
- Mark Processing orders as "In Transit" (one-click)
- Mark In Transit orders as "Completed" (one-click)
- View detailed order information
- Export filtered orders to CSV
Bulk Actions:
- Mark multiple orders as In Transit
- Mark multiple orders as Completed
- Export selection to CSV
Shortcodes
Region Switcher
Display a region switcher anywhere on your site:
[rm_region_switcher style="dropdown" show_flags="true"]
Attributes:
-
style- Display style (default: "dropdown")dropdown- Select dropdownlist- Unordered list with linksflags- Flag emoji buttons only
-
show_flags- Show country flags (default: "true")true- Display flagsfalse- Hide flags
Examples:
// Dropdown with flags
[rm_region_switcher style="dropdown" show_flags="true"]
// Simple list without flags
[rm_region_switcher style="list" show_flags="false"]
// Flags only
[rm_region_switcher style="flags"]
Widgets
Region Switcher Widget
Add the Region Switcher to any widget area:
- Go to Appearance > Widgets
- Find "Region Switcher" widget
- Drag to desired widget area
- Configure:
- Title
- Display Style (Dropdown/List/Flags)
- Show Flags (checkbox)
- Save
Developer Hooks
Action Hooks
Region Detection:
// Fired when a region is detected from URL
do_action( 'rm_region_detected', $region_id, $url_slug );
// Fired when a language code is detected
do_action( 'rm_language_code_detected', $language_code );
Order Processing:
// When order status changes to In Transit
do_action( 'woocommerce_order_status_in-transit', $order_id, $order );
Filter Hooks
Region Modification:
// Modify the detected current region
apply_filters( 'rm_current_region', $region_id );
// Modify the detected language code
apply_filters( 'rm_current_language_code', $language_code );
URL Modification:
// Modify localized URL
apply_filters( 'home_url', $url, $path );
Example: Integrate with Translator Plugin
// Automatically switch language when region is detected
add_action( 'rm_language_code_detected', function( $language_code ) {
if ( function_exists( 'pll_current_language' ) ) {
// Polylang integration
PLL()->curlang = PLL()->model->get_language( $language_code );
}
}, 10, 1 );
Example: Custom Region Detection Logic
// Override region detection based on custom logic
add_filter( 'rm_current_region', function( $region_id ) {
// Use user meta to determine region
if ( is_user_logged_in() ) {
$user_region = get_user_meta( get_current_user_id(), 'preferred_region', true );
if ( $user_region ) {
return $user_region;
}
}
return $region_id;
}, 20, 1 );
Database Schema
Tables Created
The plugin creates 4 custom database tables:
- wp_rm_regions - Stores region information
- wp_rm_region_countries - Maps countries to regions
- wp_rm_product_regions - Product-region assignments with pricing
- wp_rm_region_settings - Region-specific settings (future use)
Order Meta Keys
_rm_region_id- Region ID for the order_rm_order_url_slug- URL slug used during checkout_rm_cross_region_order- Flag for cross-region orders ("yes"/"")_rm_cross_region_fee- Applied cross-region fee amount
URL Structure
Default Structure
example.com/product/item/
example.com/shop/
example.com/cart/
With Region Manager
example.com/pt/product/item/
example.com/es/shop/
example.com/fr/cart/
Region slug is automatically prepended to all URLs when a region is active. The base URL (without region) remains accessible as the default/fallback.
Troubleshooting
Rewrite Rules Not Working
- Go to Settings > Permalinks
- Click "Save Changes" (no modifications needed)
- This flushes the rewrite rules
- Test region URLs
Prices Not Changing
- Verify product is assigned to the region
- Check that price override is set (if desired)
- Clear WooCommerce cache
- Test in incognito/private browsing mode
Region Not Detected from URL
- Ensure URL-based regions are enabled (Settings > Checkout Settings)
- Check region has a valid URL slug
- Verify region status is "Active"
- Enable WP_DEBUG to see detection logs
Session Issues
- Ensure WooCommerce sessions are working
- Check for session conflicts with other plugins
- Clear browser cookies
- Test with different browsers
Frequently Asked Questions
Q: Can I use this plugin without WooCommerce? A: No, Region Manager requires WooCommerce to be installed and active.
Q: How many regions can I create in the free version? A: The free version supports up to 2 regions. Upgrade to Pro for unlimited regions.
Q: Does this work with variable products? A: Yes! Regional pricing and availability work with variable products and their variations.
Q: Can I set different currencies per region? A: Region Manager handles pricing overrides but not currency conversion. Use a multi-currency plugin alongside Region Manager.
Q: Does this work with caching plugins? A: Yes, but you may need to exclude region URLs from page caching or use dynamic caching rules.
Q: Can I customize the region switcher design? A: Yes! The switcher uses standard HTML and CSS classes that you can style in your theme.
Changelog
Version 1.0.0 (2025-01-XX)
Initial Release
- Region management with country assignments
- Regional product pricing and availability
- Custom "In Transit" order status
- Dashboard with regional analytics
- Products and Orders management pages
- WooCommerce integration for checkout and pricing
- URL rewriting for region-based URLs
- Hreflang tags for SEO
- Region switcher shortcode and widget
- Free tier: 2 regions, Pro tier: unlimited
- WordPress Coding Standards compliant
Support
Free Support
- GitHub Issues: Report bugs and request features
- Documentation: Online documentation
- Community Forum: WordPress.org forums
Premium Support
- Email support with priority response
- Direct access to developers
- Custom integration assistance
- Upgrade to Pro
License
This plugin is licensed under the GPL v2 or later.
Region Manager
Copyright (C) 2025 Region Manager Team
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.
Credits
Developed by the Region Manager Team Icons by Dashicons Built with ❤️ for the WordPress and WooCommerce communities
Releases
24 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.