custom_js_update
Replaces a Salla store's entire custom JavaScript after reading the current script, with a local backup and merchant approval before saving.
Instructions
Replace the store's entire custom JavaScript. Runs on every storefront page once saved (if custom JS is enabled). Always read the current JS first and pass the full new script. The previous JS is backed up locally before saving. Show the merchant the change and get their OK before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | Yes | The complete new JavaScript. | |
| version_id | No | Theme version ID (from theme_versions_list). Defaults to 987654321. |