Automattic\WooCommerce\Blueprint\ResourceStorages

OrgPluginResourceStorage::download_urlprotectedWC 1.0

Download the file from the given URL.

Method of the class: OrgPluginResourceStorage{}

No Hooks.

Returns

String|WP_Error. The path to the downloaded file, or WP_Error on failure.

Usage

// protected - for code of main (parent) or child class
$result = $this->download_url( $url );
$url(string) (required)
The URL to download the file from.

OrgPluginResourceStorage::download_url() code WC 9.9.5

protected function download_url( $url ) {
	return $this->wp_download_url( $url );
}