Skip to content

createAdminAppearanceSectionStatus ​

Stages a section on or off. Like every other edit, it reaches the storefront only when the theme is published.

Input fields ​

FieldTypeRequiredDescription
sectionIdIntYesSection whose state is being staged.
statusBooleanYestrue to show the section once published, false to hide it.

Payload fields ​

FieldTypeDescription
sectionIdIntSection the status belongs to.
draftStatusBooleanThe staged state.
hasDraftBooleanWhether the section now holds any staged edit.
messageStringConfirmation text.

Use cases ​

  • Take a section down at the next publish — stage false, keep the content, publish when ready. Staging true later brings it back exactly as it was.

Best practices ​

  • The published status does not move here. Re-querying the section still shows the old value; the new one sits in draftStatus until publish.
  • To switch a section on or off immediately, send status on updateAdminAppearanceSection instead.

Permissions ​

Requires appearance.sections.edit.

Released under the MIT License.