Skip to content

Commit

Permalink
fix: setStore on delivery when extracting from token
Browse files Browse the repository at this point in the history
  • Loading branch information
Atala committed Dec 24, 2024
1 parent f5f6cf9 commit c39304f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/Entity/Listener/DeliveryListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public function prePersist(Delivery $delivery, LifecycleEventArgs $args)

public function postPersist(Delivery $delivery)
{

if ($delivery->getStore() && $delivery->getStore()->getDefaultCourier()) {
$courier = $delivery->getStore()->getDefaultCourier();

Expand Down
1 change: 1 addition & 0 deletions src/Service/DeliveryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function setDefaults(Delivery $delivery)

if (null === $store = $delivery->getStore()) {
$store = $this->storeExtractor->extractStore();
$delivery->setStore($store);
}

// If no pickup address is specified, use the store address
Expand Down

0 comments on commit c39304f

Please sign in to comment.