Automattic\WooCommerce\Blueprint
ResourceStorages::download
Download the resource.
Метод класса: ResourceStorages{}
Хуков нет.
Возвращает
false|string.
Использование
$ResourceStorages = new ResourceStorages(); $ResourceStorages->download( $slug, $resource_type );
- $slug(строка) (обязательный)
- The slug of the resource to download.
- $resource_type(строка) (обязательный)
- The resource type to download.
Код ResourceStorages::download() ResourceStorages::download WC 11.3.0
public function download( $slug, $resource_type ) {
if ( ! isset( $this->storages[ $resource_type ] ) ) {
return false;
}
$storages = $this->storages[ $resource_type ];
foreach ( $storages as $storage ) {
$found = $storage->download( $slug );
if ( $found ) {
return $found;
}
}
return false;
}