Automattic\WooCommerce\Blocks\Assets

Api::get_block_asset_build_path()publicWC 1.0

Returns the appropriate asset path for current builds.

Метод класса: Api{}

Хуков нет.

Возвращает

Строку. The generated path.

Использование

$Api = new Api();
$Api->get_block_asset_build_path( $filename, $type );
$filename(строка) (обязательный)
Filename for asset path (without extension).
$type(строка)
File type (.css or .js).
По умолчанию: 'js'

Код Api::get_block_asset_build_path() WC 8.7.0

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