Skip to content

Commit

Permalink
Merge pull request #2 from outeredge/fix-status-not-change-to-complete
Browse files Browse the repository at this point in the history
Fix status not going to complete
  • Loading branch information
broopdias authored Apr 19, 2022
2 parents 5b3e354 + 5b7019b commit bd5e17e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Controller/Adminhtml/Order/MassOrderShip.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace OuterEdge\BulkActions\Controller\Adminhtml\Order;

use Magento\Backend\App\Action\Context;
use Magento\Sales\Model\Order as ModelOrder;
use Magento\Sales\Model\Convert\Order as ConvertOrder;
use Magento\Sales\Model\OrderFactory as ModelOrder;
use Magento\Sales\Model\Convert\OrderFactory as ConvertOrder;
use Magento\Framework\Message\ManagerInterface;
use Magento\Shipping\Model\ShipmentNotifier;

Expand Down Expand Up @@ -64,10 +64,10 @@ public function execute()
// Ship Order
foreach ($ordersId as $orderId) {

$order = $this->orderModel->loadByAttribute('entity_id', $orderId);
$order = $this->orderModel->create()->load($orderId);
if ($order->canShip()) {

$convertOrder = $this->convertOrder;
$convertOrder = $this->convertOrder->create();
$shipment = $convertOrder->toShipment($order);

foreach ($order->getAllItems() AS $orderItem) {
Expand Down

0 comments on commit bd5e17e

Please sign in to comment.