In Shopify delivery customization function, we are getting old attributes value

We are getting the cart attribute ‘is Saturday’ on our Shopify delivery function and showing/hiding Saturday shipping options based on this attribute value. We are facing issues with the value of an old attribute as it turns out the shipping option are shown based on the first value user selected before order completion and not the last value.

E.g →

  • Assume cart attribute: isDeliveredSaturday.

  • First User selects the attribute ‘Yes’ and goes to the checkout page

  • Saturday shipping option is shown based on my Shopify function logic.

  • User comes back to the cart page again without completing the order and decides to change the attributes to ‘No’.

  • User selects the ‘No’.

  • on the checkout page Saturday shipping option is still showing. - it should be hidden by the logic.

I don’t think it’s a code issue as the function works fine each time in the new incognito browser. But we cannot ask users to open incognito each time they order. :slightly_smiling_face:

1 Like