WC_Settings_Page::get_settings_section_registry │ protected │ WC 1.0

Settings section registry instance, or null when the modern settings SDK is unavailable.

The class can be missing mid-update: a 10.9 copy of this file may load before the autoloader class map can safely resolve the new registry, so a direct call would fatal.

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

Хуков нет.

Возвращает

SettingsSectionRegistry|null.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_settings_section_registry();

Код WC_Settings_Page::get_settings_section_registry() WC 11.3.0

protected function get_settings_section_registry() {
	try {
		if ( ! class_exists( SettingsSectionRegistry::class ) ) {
			return null;
		}

		return SettingsSectionRegistry::get_instance();
	} catch ( \Throwable $e ) {
		return null;
	}
}