Automattic\WooCommerce\Blueprint
ResourceStorages::download
Download the resource.
Method of the class: ResourceStorages{}
No Hooks.
Returns
false|String.
Usage
$ResourceStorages = new ResourceStorages(); $ResourceStorages->download( $slug, $resource_type );
- $slug(string) (required)
- The slug of the resource to download.
- $resource_type(string) (required)
- The resource type to download.
ResourceStorages::download() ResourceStorages::download code WC 10.8.1
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;
}