WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks

AssetsController::register_style() protected WC 1.0

Registers a style according to wp_register_style.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->register_style( $handle, $src, $deps, $media, $rtl );
$handle(string) (required)
Name of the stylesheet. Should be unique.
$src(string) (required)
Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
$deps(array)
An array of registered stylesheet handles this stylesheet depends on.
Default: empty array
$media(string)
The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
Default: 'all'
$rtl(true|false)
Whether or not to register RTL styles.
Default: false

Code of AssetsController::register_style() WC 5.9.0

protected function register_style( $handle, $src, $deps = [], $media = 'all', $rtl = false ) {
	$filename = str_replace( plugins_url( '/', __DIR__ ), '', $src );
	$ver      = self::get_file_version( $filename );

	wp_register_style( $handle, $src, $deps, $ver, $media );

	if ( $rtl ) {
		wp_style_add_data( $handle, 'rtl', 'replace' );
	}
}