WC_Settings_Page::get_settings_section_registryprotectedWC 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.

Method of the class: WC_Settings_Page{}

No Hooks.

Returns

SettingsSectionRegistry|null.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_settings_section_registry();

WC_Settings_Page::get_settings_section_registry() code WC 10.9.3

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

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