Skip to content

Commit

Permalink
Check if order uses the module before sending confirmation email (#6)
Browse files Browse the repository at this point in the history
* Check if order uses the module before sending confirmation email

* Change version

Co-authored-by: jcournut <jcournut@openstudio.fr>
  • Loading branch information
julescournut and julescournut authored May 28, 2021
1 parent 534f4be commit 4f672ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Config/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.0.2</version>
<version>1.0.3</version>
<authors>
<author>
<name>Thelia</name>
Expand Down
3 changes: 2 additions & 1 deletion EventListeners/ShippingNotificationSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public static function getSubscribedEvents()
*/
public function sendShippingNotification(OrderEvent $event)
{
if ($event->getOrder()->isSent()) {
$order = $event->getOrder();
if ($event->getOrder()->isSent() && $order->getDeliveryModuleId() == ColissimoHomeDelivery::getModuleId()) {
$contact_email = ConfigQuery::getStoreEmail();

if ($contact_email) {
Expand Down

0 comments on commit 4f672ab

Please sign in to comment.