Automattic\WooCommerce\Blocks\Assets
Api::get_block_asset_build_path
Returns the appropriate asset path for current builds.
Method of the class: Api{}
No Hooks.
Returns
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() Api::get block asset build path code WC 10.8.1
public function get_block_asset_build_path( $filename, $type = 'js' ) {
return "assets/client/blocks/$filename.$type";
}