From 89d464f91235ec455d5b1f7f31665b485f4a4ea4 Mon Sep 17 00:00:00 2001 From: nedu64 Date: Fri, 11 Oct 2024 21:45:39 +0100 Subject: [PATCH] chore: code refactor --- src/templates/checkout/shipping.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/checkout/shipping.twig b/src/templates/checkout/shipping.twig index d35aa01..4b0974a 100644 --- a/src/templates/checkout/shipping.twig +++ b/src/templates/checkout/shipping.twig @@ -13,7 +13,7 @@ {% if cart is defined %} {% if currentStore.requireShippingMethodSelectionAtCheckout == false %} {# If there's 1 or more shipping method available then set it on the cart #} - {% if cart.availableShippingMethodOptions|length == 1 or cart.availableShippingMethodOptions|length > 1 %} + {% if cart.availableShippingMethodOptions|length >= 1 %} {% for handle, option in cart.availableShippingMethodOptions %} {% set onlyMethod = handle %} {% endfor %} @@ -23,7 +23,7 @@ {% endif %} {% else %} {# If there's 1 or more shipping method available then set it on the cart #} - {% if cart.availableShippingMethodOptions|length == 1 or cart.availableShippingMethodOptions|length > 1 %} + {% if cart.availableShippingMethodOptions|length >= 1 %} {% for handle, option in cart.availableShippingMethodOptions %} {% set onlyMethod = handle %} {% endfor %}