lueroux/order-transfer-tool
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
=== Order Transfer Tool === Contributors: LueRoux Tags: woocommerce, orders, customer, transfer, admin Requires at least: 6.2 Tested up to: 6.9 Stable tag: 1.2.4 Requires PHP: 7.4 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html Move WooCommerce orders from one customer to another. == Description == The Order Transfer Tool provides WooCommerce store administrators with a safe and efficient way to transfer orders between customer accounts. This is particularly useful when customers accidentally place orders while logged into the wrong account, or when consolidating orders from duplicate accounts. **Key Features:** * **Batch Processing**: Transfer hundreds of orders without timeout using AJAX batch processing * **Undo Support**: Restore orders to their original customer at any time * **Selective Transfer**: Choose specific orders to transfer with checkbox selection * **User Search**: Find customers by name, email, or user ID with autocomplete * **Rate Limiting**: Built-in protection against accidental rapid transfers * **Transfer History**: View all past transfers and undo when needed * **HPOS Compatible**: Works with WooCommerce High-Performance Order Storage * **Accessible**: WCAG-compliant interface with keyboard navigation **Use Cases:** * Customer placed orders while logged into wrong account * Merging duplicate customer accounts * Moving orders to a new account after email change * Correcting assignment errors for guest-to-customer conversions * Bulk order reassignment for account cleanup **Security & Performance:** * Nonce-protected AJAX requests * Proper capability checks (manage_woocommerce) * Rate limiting (3 transfers per minute per admin) * Batch processing prevents timeouts * Full audit trail with transfer timestamps == Installation == 1. Upload the `order-transfer-tool` folder to your `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Navigate to **Tools → Order Transfer** to start using the tool == Frequently Asked Questions == = Will this affect my order data? = No. The tool only changes the customer assignment and updates billing information to match the new customer. All order data, products, and payment records remain intact. = Can I undo a transfer? = Yes. Every transfer is logged and can be undone from the "Transfer History" tab. The original customer ID is preserved in order meta for audit purposes. = Is this compatible with WooCommerce High-Performance Order Storage (HPOS)? = Yes. The plugin detects HPOS and uses the appropriate database tables for both storage and queries. = How many orders can I transfer at once? = The tool processes orders in batches of 20 via AJAX to prevent server timeouts. You can transfer hundreds or thousands of orders in one session. = What permissions are required? = Users need the `manage_woocommerce` capability to access and use the Order Transfer Tool. == Changelog == = 1.2.4 = * Renamed all CSS classes and IDs to use new prefix for consistency * Fixed SQL prepared statement to use %i placeholder for table identifiers * Updated WordPress minimum requirement to 6.2 (required for %i placeholder support) * Updated uninstall.php with new prefix for meta keys and transients = 1.2.3 = * Security: Added proper escaping for all output using esc_html(), esc_attr(), esc_url() * Security: Fixed XSS vulnerabilities in JavaScript by using jQuery .text() instead of HTML concatenation * Changed all prefixes for WordPress.org compliance (4+ characters) * Renamed AJAX actions, nonces, transients, and meta keys to use new prefix * Renamed global init function and action hooks to use proper prefix * Added strict type comparisons for customer ID checks * Updated all localized strings to use esc_html__() for late escaping = 1.2.2 = * Fixed all WordPress coding standards compliance issues * Added translator comments for all translatable strings with placeholders * Implemented ordered placeholders (%1$d, %2$d) for proper i18n support * Fixed nonce handling with proper wp_unslash() and sanitization * Added HPOS (High-Performance Order Storage) compatibility declaration * Moved menu item from WooCommerce to Tools menu * Improved database query security with phpcs annotations * Removed load_plugin_textdomain (auto-loaded by WordPress.org) * Updated for WordPress.org plugin repository submission = 1.2.1 = * Fixed rate limiting to apply per transfer session instead of per batch * Improved SelectWoo/Select2 compatibility * Removed invalid search column from user query * Added missing i18n strings for undo functionality * Enhanced security checks and error handling = 1.2.0 = * Added undo/rollback capability with transfer history * Implemented AJAX batch processing for large transfers * Added Select2-powered user search autocomplete * Created languages folder for internationalization * Implemented rate limiting to prevent rapid transfers * Added selective order transfer with checkboxes * Enhanced UI with progress indicators and better UX = 1.1.0 = * Fixed potential null pointer exception with order dates * Added proper return statements after wp_send_json calls * Improved error handling and logging * Externalized JavaScript from inline to separate file * Enhanced nonce verification and capability checks = 1.0.0 = * Initial release * Basic order transfer functionality * Admin interface under WooCommerce menu * Order preview before transfer * Customer validation and error handling == Upgrade Notice == = 1.2.4 = Prefix consistency update. Renames all CSS classes/IDs and fixes SQL prepared statements. Requires WordPress 6.2+. = 1.2.3 = Security and WordPress.org compliance update. Fixes escaping issues and updates all prefixes to meet 4+ character requirement. = 1.2.2 = WordPress.org compliance update. Fixes all coding standards issues and adds HPOS compatibility declaration. = 1.2.1 = Recommended update for all users. Fixes rate limiting issue that could block large transfers mid-process. = 1.2.0 = Major feature update. Adds undo capability, batch processing, and improved user experience. == Additional Information == **Plugin Documentation**: For detailed usage instructions, please visit the plugin admin page after installation. **Support**: For support and feature requests, please use the WordPress.org support forums. **Privacy**: This plugin does not collect or transmit any personal data. All operations are performed locally on your WordPress installation.