Publishing and unpublishing scripts

Use the Script Editor to publish and unpublish your scripts to your store.

After you have created your scripts and tested them, then you can publish them to your store. A script that is published runs in your store when it is triggered. For example, a line items script runs whenever a change occurs to a cart.

You can publish one script per script type at a time. For example, you can publish a line items script and a shipping rates script, but you can't publish two line items scripts at the same time.

When you publish a script the following occurs:

  • any error counts that are connected to the script are cleared and information about the errors disappears from the script.
  • you are subscribed automatically to notification emails for that script. Whenever a production error occurs in that script, you receive an email about the error.

Publishing a script does not apply its discounts to existing carts. Similarly, unpublishing a script does not remove discounts that the script has applied to existing carts.

You can also schedule line item and shipping scripts to run during events using the Launchpad app.

After you publish a script, it runs in your online store and in any apps that are built on the following APIs and SDKs:

To publish a script:

  1. In the Script Editor, click the name of the draft script that you want to publish.

  2. Click Publish or Save and publish to save changes to the script and publish it.

Unpublish a script

Unpublishing a script does not remove discounts that the script has applied to existing carts.

To unpublish a script:

  1. In the Script Editor, click the name of the published script that you want to unpublish.

  2. Click Unpublish to make the script an unpublished draft.

Next steps

After you have published your scripts, you can update your Liquid template files so that your storefront responds to the changes that your scripts make.

Learn more about

Ready to start selling with Shopify?Try it free