Automattic\WooCommerce\Blueprint

ResourceStorages::downloadpublicWC 1.0

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() code WC 9.9.5

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;
}