Automattic\WooCommerce\Internal\Admin

WCAdminAssets::get_url()public staticWC 1.0

Gets the URL to an asset file.

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

No Hooks.

Return

String. URL to asset.

Usage

$result = WCAdminAssets::get_url( $file, $ext );
$file(string) (required)
File name (without extension).
$ext(string) (required)
File extension.

Code of WCAdminAssets::get_url() WC 7.1.0

public static function get_url( $file, $ext ) {
	$suffix = '';

	// Potentially enqueue minified JavaScript.
	if ( $ext === 'js' ) {
		$script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
		$suffix       = self::should_use_minified_js_file( $script_debug ) ? '.min' : '';
	}

	return plugins_url( self::get_path( $ext ) . $file . $suffix . '.' . $ext, WC_ADMIN_PLUGIN_FILE );
}