Created
December 4, 2014 23:55
-
-
Save rgranadino/a3dfe55f21b347682144 to your computer and use it in GitHub Desktop.
really force magento orders complete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $collection Mage_Sales_Model_Resource_Order_Collection */ | |
$collection = Mage::getResourceModel('sales/order_collection'); | |
$reflection = new ReflectionMethod( Mage_Sales_Model_Order, '_setState'); | |
$reflection->setAccessible(true); | |
foreach ($collection as $order) { | |
/* @var $order Mage_Sales_Model_Order */ | |
$reflection->invoke($order, 'complete', 'bulk_complete', 'force complete', false, false); | |
$order->save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment