Automattic\WooCommerce\Blueprint\ResourceStorages
LocalPluginResourceStorage::download
Local plugins are already included (downloaded) in the zip file. Return the full path.
Method of the class: LocalPluginResourceStorage{}
No Hooks.
Returns
String|null
.
Usage
$LocalPluginResourceStorage = new LocalPluginResourceStorage(); $LocalPluginResourceStorage->download( $slug ): ?string;
- $slug(string) (required)
- The slug of the plugin to be downloaded.
LocalPluginResourceStorage::download() LocalPluginResourceStorage::download code WC 9.9.5
public function download( $slug ): ?string { foreach ( $this->paths as $path ) { $full_path = $path . "/{$this->suffix}/" . $slug . '.zip'; if ( is_file( $full_path ) ) { return $full_path; } } return null; }