Stop Registering Customizer Options for Block Themes

Update

We have introduced some changes since this post was originally published and starting with WC 6.9, if a site has a block theme active, WooCommerce Customizer options are registered when accessing the Customizer directly, but not when visiting other admin pages.

Here are some different scenarios:

  • Site with classic theme active: No change of behavior between WooCommerce 6.8 and 6.9.
  • Site with block theme active and no other plugin that registers customizer settings: The customizer menu item will not be available, however, if users browse directly to the customize page (wp-admin/customize.php), they will be able to access and change WooCommerce’s customize settings.
  • Site with block theme active and a plugin other than WooCommerce that registers customizer setting: The customizer menu will be available and when users browse to the customizer page they will be able to access and change WooCommerce settings.

Summary

Starting at version 6.9, WooCommerce will no longer register Customizer options when a block theme is active.

The Details

The primary way for site owners to customize their site was via the WordPress Customizer, and WooCommerce did register a few commerce-specific settings. But with the advent of Block Themes and Full Site Editing came a new way to personalize a site: the Site Editor.

Now, when a block theme is active, there are two paths for customizing a site: Edit Site and Customize.

To avoid confusion with these two options and support the transition to the Site Editor, WooCommerce Core will no longer register customizer options when a block theme is active. This change will be introduced with the release of WooCommerce 6.9 in September 2022. 

However, if a plugin or custom code registers a callback function for the customize_register action, the Customize menu item will still be added in.

How can I tell if this affects me?

Subpanels or sections registered within the WooCommerce panel on the Customizer will no longer be accessible since the Customizer links will be removed. If you’re the developer of a theme or extension that relies on the presence of these you will need to make changes to ensure a smooth transition.

What action should I take?

If you’re the developer of a theme or extension that relies on the presence of the WooCommerce sections in the Customizer and your settings are still needed when a block theme is active, consider registering them to a new section in the Customizer. However, we recommend you investigate either replacing those settings with a block, pattern, or Global Styles.


3 responses to “Stop Registering Customizer Options for Block Themes”

  1. pimomedia Avatar

    Where we will find those options from 6.9 onwards?

    1. We are progressively migrating those options into block-based features. If for some reason, you still need to access the Customizer when having a block theme active, you can still go to wp-admin/customize.php. Hope that helps!

  2. We have introduced some changes since this post was originally published and starting with WC 6.9, if a site has a block theme active, WooCommerce Customizer options are registered when accessing the Customizer directly, but not when visiting other admin pages.

    Here are some different scenarios:

    Site with classic theme active: No change of behavior between WooCommerce 6.8 and 6.9.
    Site with block theme active and no other plugin that registers customizer settings: The customizer menu item will not be available, however, if users browse directly to the customize page (wp-admin/customize.php), they will be able to access and change WooCommerce’s customize settings.
    Site with block theme active and a plugin other than WooCommerce that registers customizer setting: The customizer menu will be available and when users browse to the customizer page they will be able to access and change WooCommerce settings.

Leave a Reply

Your email address will not be published. Required fields are marked *