Publishing and unpublishing scripts

Use theScript Editorto publish and unpublish your scripts to your store.

After you havecreated your scriptsandtested 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 tonotification emailsfor 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 theLaunchpad应用程序。

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 theScript Editor, click the name of the draft script that you want to publish.

  2. ClickPublishorSave and publishto 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 theScript Editor, click the name of the published script that you want to unpublish.

  2. ClickUnpublishto make the script an unpublished draft.

Next steps

发表您的脚本之后,您的canupdate your Liquid template filesso that your storefront responds to the changes that your scripts make.

Learn more about

Ready to start selling with Shopify?

Try it free