Automattic\WooCommerce\Internal\Admin

WCAdminAssets::get_settings_ui_script_dependencies │ private │ WC 1.0

Get extension script handles that must load before the settings embed app mounts.

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

Хуков нет.

Возвращает

array.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_settings_ui_script_dependencies(): array;

Код WCAdminAssets::get_settings_ui_script_dependencies() WC 11.3.0

private function get_settings_ui_script_dependencies(): array {
	try {
		if ( ! class_exists( SettingsUIRequestContext::class ) ) {
			return array();
		}

		$context = SettingsUIRequestContext::get_current();
		if ( ! $context || $context->has_script_handles_failed() ) {
			return array();
		}

		$dependencies = array_merge(
			array( 'wc-settings-ui' ),
			$context->get_script_handles()
		);

		return array_values( array_unique( $dependencies ) );
	} catch ( \Throwable $e ) {
		return array();
	}
}