WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WC_Shop_Customizer::add_store_notice_section() private WC 1.0

Store notice section.

{} Это метод класса: WC_Shop_Customizer{}

Хуков нет.

Возвращает

Null. Ничего.

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

// private - только в коде основоного (родительского) класса
$result = $this->add_store_notice_section( $wp_customize );
$wp_customize(WP_Customize_Manager) (обязательный)
Theme Customizer object.

Код WC_Shop_Customizer::add_store_notice_section() WC 4.6.1

<?php
private function add_store_notice_section( $wp_customize ) {
	$wp_customize->add_section(
		'woocommerce_store_notice',
		array(
			'title'    => __( 'Store Notice', 'woocommerce' ),
			'priority' => 10,
			'panel'    => 'woocommerce',
		)
	);

	$wp_customize->add_setting(
		'woocommerce_demo_store',
		array(
			'default'              => 'no',
			'type'                 => 'option',
			'capability'           => 'manage_woocommerce',
			'sanitize_callback'    => 'wc_bool_to_string',
			'sanitize_js_callback' => 'wc_string_to_bool',
		)
	);

	$wp_customize->add_setting(
		'woocommerce_demo_store_notice',
		array(
			'default'           => __( 'This is a demo store for testing purposes &mdash; no orders shall be fulfilled.', 'woocommerce' ),
			'type'              => 'option',
			'capability'        => 'manage_woocommerce',
			'sanitize_callback' => 'wp_kses_post',
			'transport'         => 'postMessage',
		)
	);

	$wp_customize->add_control(
		'woocommerce_demo_store_notice',
		array(
			'label'       => __( 'Store notice', 'woocommerce' ),
			'description' => __( 'If enabled, this text will be shown site-wide. You can use it to show events or promotions to visitors!', 'woocommerce' ),
			'section'     => 'woocommerce_store_notice',
			'settings'    => 'woocommerce_demo_store_notice',
			'type'        => 'textarea',
		)
	);

	$wp_customize->add_control(
		'woocommerce_demo_store',
		array(
			'label'    => __( 'Enable store notice', 'woocommerce' ),
			'section'  => 'woocommerce_store_notice',
			'settings' => 'woocommerce_demo_store',
			'type'     => 'checkbox',
		)
	);

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'woocommerce_demo_store_notice',
			array(
				'selector'            => '.woocommerce-store-notice',
				'container_inclusive' => true,
				'render_callback'     => 'woocommerce_demo_store',
			)
		);
	}
}