Everything worked/tested great on the dev store and the discount was properly applied as indicated by code (i.e. applied when purchasing 2 or more of a product).
Next, I ran npm run deploy and switched over to the partner portal.
From Shopify Partners > Apps > Choose distribution > Custom distribution, I received an install link and ran it in my browser to install on ,my company’s production store. The app seems to have installed properly.
Then, I ran the [same as my dev store] mutation through GraphiQL App on my production store and the mutation [add discount] was created without ‘userErrors’
After reviewing the Functions logs to determine if the function is being called, I can see the response from the dev store, but
The function is NOT being called from my production store (even though it is installed). Is there more that needs to be configured on the production store than pictured above?
Answer is to review the Checkout settings for the production store and see that the checkout is published, not draft. In order to complete the upgrade to checkout extensibility you need to publish a checkout. Navigate to Settings > Checkout and publish the Draft checkout then test the function again.
I have been having some issues with trying to test some Shopify functions. The functions work on the development stores (I have tested them all on 3 different dev stores). The checkout UI extensions work on both the dev store and the live store. the live store I am moving over to use checkout extensibility instead of the checkout.liquid file. So I have a draft checkout that I am testing everything on. I made the draft store and then go to preview from the draft checkout. The checkout UI extensions work there but not any of the functions. the functions are not even firing at all on the live store. I just wanted to verify that even though the discounts are installed on the store and using a preview of the draft checkout, The functions still will not work until the new checkout is published?