Rerender core Templates with with ToggleControl but it doesnt recognize block type

Neat implementation 🙂 The issue responsible for that error is here: const [template, setTemplate] = useState([ [“core/heading”, { placeholder: “Three CTA Block” }], [“core/columns”, {}, […column]], ]) As well as here: setTemplate([ [“core/heading”, { placeholder: “Three CTA Block” }], [“core/columns”, {}, […newColumn]], ]) If present, the third element of a block template block item array … Read more

WooCommerce maintaince mode by using php

You need to replace the following: if ( ! current_user_can(‘administrator’) ) { with if ( ! current_user_can(‘manage_options’) ) { This is because there’s no such capability as administrator. There are a couple of administrator-only capabilities, and manage_options is a reliable one to use.