WC_Settings_Page::get_settings_for_section_coreprotectedWC 1.0

Get the settings for a given section. This method is invoked from 'get_settings_for_section' when no 'get_settings_for_{current_section}_section' method exists in the class.

When overriding, note that the 'woocommerce_get_settings_' filter must NOT be triggered, as this is already done by 'get_settings_for_section'.

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

Хуков нет.

Возвращает

Массив. Settings array, each item being an associative array representing a setting.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_settings_for_section_core( $section_id );
$section_id(строка) (обязательный)
The section name to get the settings for.

Код WC_Settings_Page::get_settings_for_section_core() WC 10.9.4

protected function get_settings_for_section_core( $section_id ) {
	$registry           = $this->get_settings_section_registry();
	$registered_section = $registry ? $registry->get_registered( $this->id, (string) $section_id ) : null;

	return $registered_section ? $registered_section->get_settings( $this ) : array();
}