diff --git a/Helper/Order.php b/Helper/Order.php index 7a6bae8..69dcd32 100755 --- a/Helper/Order.php +++ b/Helper/Order.php @@ -23,7 +23,7 @@ class Order */ public function isPaazlOrder(OrderInterface $order) { - return $this->isPaazlShippingMethod($order->getShippingMethod()); + return $this->isPaazlShippingMethod((string)$order->getShippingMethod()); } /** @@ -33,6 +33,9 @@ public function isPaazlOrder(OrderInterface $order) */ public function isPaazlShippingMethod(string $shippingMethod) { + if (!$shippingMethod) { + return false; + } $params = explode('_', $shippingMethod, 2); return !empty($params[0]) && ($params[0] === Paazlshipping::CODE); } diff --git a/Plugin/Quote/CartManagementPlugin.php b/Plugin/Quote/CartManagementPlugin.php index 33d1008..d3f0ca2 100644 --- a/Plugin/Quote/CartManagementPlugin.php +++ b/Plugin/Quote/CartManagementPlugin.php @@ -66,7 +66,7 @@ public function beforePlaceOrder( } $shippingMethod = $quote->getShippingAddress()->getShippingMethod(); - if (!$this->orderHelper->isPaazlShippingMethod($shippingMethod)) { + if (!$this->orderHelper->isPaazlShippingMethod((string)$shippingMethod)) { return null; } diff --git a/Plugin/Tax/Config.php b/Plugin/Tax/Config.php index ede3275..4adb405 100644 --- a/Plugin/Tax/Config.php +++ b/Plugin/Tax/Config.php @@ -80,7 +80,7 @@ public function afterShippingPriceIncludesTax( $cartId = $this->session->getData($this->getQuoteIdKey()); $shippingMethod = $this->quoteAddressResource->getShippingMethodByQuoteId((int)$cartId); if ($shippingMethod - && $this->orderHelper->isPaazlShippingMethod($shippingMethod) + && $this->orderHelper->isPaazlShippingMethod((string)$shippingMethod) && $this->paazlConfig->isPriceIncludesTax($store) ) { return true; diff --git a/composer.json b/composer.json index c6da744..33e144e 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "paazl/magento2-checkout-widget", "description": "Paazl checkoutWidget for Magento 2", "type": "magento2-module", - "version": "1.11.1", + "version": "1.11.2", "keywords": [ "Paazl", "Magento 2", diff --git a/etc/config.xml b/etc/config.xml index 338ad8e..73de857 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -8,7 +8,7 @@ - v1.11.1 + v1.11.2 0 0 0