WooCommerce::init_customizerpublicWC 1.0

Initialize the customizer on the plugins_loaded action. If WooCommerce is network activated, wp_is_block_theme() will be called too early, which cause the warning in #58364. By initializing the customizer on plugins_loaded, we ensure that wp_is_block_theme() is called after theme directories registration.

Метод класса: WooCommerce{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WooCommerce = new WooCommerce();
$WooCommerce->init_customizer();

Заметки

Код WooCommerce::init_customizer() WC 11.0.1

public function init_customizer() {
	global $pagenow;
	if (
		'customize.php' === $pagenow ||
		isset( $_REQUEST['customize_theme'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
		! wp_is_block_theme()
	) {
		new WC_Shop_Customizer();
	}
}