WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

Loader::register_scripts() public WC 1.0

Registers all the neccessary scripts and styles to show the admin experience.

{} It's a method of the class: Loader{}

No Hooks.

Return

null. Nothing.

Usage

$result = Loader::register_scripts();

Code of Loader::register_scripts() WC 5.3.0

<?php
public static function register_scripts() {
	if ( ! function_exists( 'wp_set_script_translations' ) ) {
		return;
	}

	$js_file_version  = self::get_file_version( 'js' );
	$css_file_version = self::get_file_version( 'css' );

	$scripts = array(
		'wc-customer-effort-score',
		// NOTE: This should be removed when Gutenberg is updated and the notices package is removed from WooCommerce Admin.
		'wc-notices',
		'wc-number',
		'wc-tracks',
		'wc-date',
		'wc-components',
		WC_ADMIN_APP,
		'wc-csv',
		'wc-store-data',
		'wc-currency',
		'wc-navigation',
	);

	$scripts_map = array(
		WC_ADMIN_APP    => 'app',
		'wc-csv'        => 'csv-export',
		'wc-store-data' => 'data',
	);

	$translated_scripts = array(
		'wc-currency',
		'wc-date',
		'wc-components',
		WC_ADMIN_APP,
	);

	foreach ( $scripts as $script ) {
		$script_path_name = isset( $scripts_map[ $script ] ) ? $scripts_map[ $script ] : str_replace( 'wc-', '', $script );

		try {
			$script_assets_filename = self::get_script_asset_filename( $script_path_name, 'index' );
			$script_assets          = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . $script_path_name . '/' . $script_assets_filename;

			wp_register_script(
				$script,
				self::get_url( $script_path_name . '/index', 'js' ),
				$script_assets ['dependencies'],
				$js_file_version,
				true
			);

			if ( in_array( $script, $translated_scripts, true ) ) {
				wp_set_script_translations( $script, 'woocommerce' );
			}
		} catch ( \Exception $e ) {
			// Avoid crashing WordPress if an asset file could not be loaded.
			wc_caught_exception( $e, __CLASS__ . '::' . __FUNCTION__, $script_path_name );
		}
	}

	wp_register_style(
		'wc-components',
		self::get_url( 'components/style', 'css' ),
		array(),
		$css_file_version
	);
	wp_style_add_data( 'wc-components', 'rtl', 'replace' );

	wp_register_style(
		'wc-components-ie',
		self::get_url( 'components/ie', 'css' ),
		array(),
		$css_file_version
	);
	wp_style_add_data( 'wc-components-ie', 'rtl', 'replace' );

	wp_register_style(
		'wc-customer-effort-score',
		self::get_url( 'customer-effort-score/style', 'css' ),
		array(),
		$css_file_version
	);
	wp_style_add_data( 'wc-customer-effort-score', 'rtl', 'replace' );

	wp_localize_script(
		WC_ADMIN_APP,
		'wcAdminAssets',
		array(
			'path'    => plugins_url( self::get_path( 'js' ), WC_ADMIN_PLUGIN_FILE ),
			'version' => $js_file_version,
		)
	);

	// The "app" RTL files are in a different format than the components.
	$rtl = is_rtl() ? '.rtl' : '';

	wp_register_style(
		WC_ADMIN_APP,
		self::get_url( "app/style{$rtl}", 'css' ),
		array( 'wc-components', 'wc-customer-effort-score', 'wp-components' ),
		$css_file_version
	);

	wp_register_style(
		'wc-admin-ie',
		self::get_url( "ie/style{$rtl}", 'css' ),
		array( WC_ADMIN_APP ),
		$css_file_version
	);
}