How to duplicate orders in Magento 2.4.x

How to duplicate orders in Magento 2.4.x
How to duplicate orders in Magento 2.4.x
Loading... 4 view(s) 1 min read

Why would you ever need to duplicate an order in Magento? A few weeks ago I would have asked the same question. In this instance, it was caused by needed to re-send a subscription order through to an ERP after the expiration window for the order had expired at the payment provider. This script duplicates the order and assigns it a new increment ID. It does not re-authorize the card or do any other financial transactions.

Github: https://github.com/seanbreeden/magento-duplicate-order.git

Usage: php duplicate_order.php <original_increment_id>

 

Previous article:
Next article:
Comments
Leave your comment
Your email address will not be published