Automattic\WooCommerce\Blocks\Assets

Api::get_block_asset_build_path()publicWC 1.0

Returns the appropriate asset path for current builds.

Method of the class: Api{}

No Hooks.

Return

String. The generated path.

Usage

$Api = new Api();
$Api->get_block_asset_build_path( $filename, $type );
$filename(string) (required)
Filename for asset path (without extension).
$type(string)
File type (.css or .js).
Default: 'js'

Api::get_block_asset_build_path() code WC 8.7.0

public function get_block_asset_build_path( $filename, $type = 'js' ) {
	return "assets/client/blocks/$filename.$type";
}