Automattic\WooCommerce\Internal\Admin

SettingsNavigationFeature::add_component_settings()public staticWC 1.0

Add the necessary data to initially load the WooCommerce Settings pages.

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

Хуков нет.

Возвращает

Массив. Array of component settings.

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

$result = SettingsNavigationFeature::add_component_settings( $settings );
$settings(массив) (обязательный)
Array of component settings.

Код SettingsNavigationFeature::add_component_settings() WC 6.6.1

public static function add_component_settings( $settings ) {
	if ( ! is_admin() ) {
		return $settings;
	}

	$setting_pages = \WC_Admin_Settings::get_settings_pages();
	$pages         = array();
	foreach ( $setting_pages as $setting_page ) {
		$pages = $setting_page->add_settings_page( $pages );
	}

	$settings['settingsPages'] = $pages;

	return $settings;
}