I’m encountering an issue with a Shopify function for cart and checkout validation, which checks if only customers with a specific tag are allowed to purchase certain products. During the logout process, it appears that the validation function is unexpectedly triggered. Since the customer is no longer tagged after logging out, this causes the validation to fail, which in turn completely blocks the logout process.
After reviewing the official documentation, I noticed that the available BuyerJourneyStep options are limited to CART_INTERACTION, CHECKOUT_COMPLETION, and CHECKOUT_INTERACTION (reference). There doesn’t seem to be a specific step associated with logout, yet the validation is still being triggered at this point.
My questions are:
- Has anyone else encountered issues with cart validation being triggered during logout?
- Is there a way to distinguish in the Shopify function for cart and checkout validation if the input is resulting from a logout action? This would allow me to bypass these triggers and ensure the logout process can complete normally.
For a clearer understanding, I’ve attached a screen recording of the issue: Video Link.
Any advice or suggestions on handling this would be greatly appreciated!
Thanks!
