Skip to content

Commit

Permalink
Merge pull request #18 from mage-os/support-zero-total-orders
Browse files Browse the repository at this point in the history
Publish "sales.order.paid" event if an order is paid directly on creation
  • Loading branch information
avstudnitz authored Dec 6, 2024
2 parents 64df935 + 8009c6e commit 3b9a6fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Observer/SalesOrderSaveAfterObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ private function isOrderStatusUpdated(Order $order): bool

private function isOrderPaid(Order $order): bool
{
return $order->getBaseTotalDue() == 0 && $order->getOrigData('base_total_due') != 0;
return $order->getBaseTotalDue() == 0 &&
($this->isOrderNew($order) || $order->getOrigData('base_total_due') != 0);
}

private function isOrderHolded(Order $order): bool
Expand Down

0 comments on commit 3b9a6fe

Please sign in to comment.