Automattic\WooCommerce\Admin\Settings
SettingsSectionRegistry::initialize
Fire the section registration action once.
Метод класса: SettingsSectionRegistry{}
Хуки из метода
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->initialize(): void;
Код SettingsSectionRegistry::initialize() SettingsSectionRegistry::initialize WC 10.9.1
private function initialize(): void {
if ( $this->initialized ) {
return;
}
// Mark initialized before firing the action so re-entrant registry lookups do not run it again.
$this->initialized = true;
try {
/**
* Fires when settings sections can be registered.
*
* @param SettingsSectionRegistry $registry Settings section registry.
*
* @since 10.9.0
*/
do_action( 'woocommerce_settings_sections_registration', $this );
} catch ( \Throwable $e ) {
wc_get_logger()->error(
sprintf(
'Settings section registration failed: %1$s: %2$s',
get_class( $e ),
$e->getMessage()
),
array( 'source' => 'settings-ui' )
);
if ( $e instanceof \Exception ) {
wc_caught_exception( $e, __CLASS__ . '::' . __FUNCTION__ );
}
}
}