function download_package($package) { $package = $this->getDownloadUrl(); if (is_wp_error($package)) { return $package; } return parent::download_package($package); }
/** * Download a package. * * @param string $package The URI of the package. If this is the full path to an * existing local file, it will be returned untouched. * @return string|WP_Error The full path to the downloaded package file, or a {@see WP_Error} object. */ public function download_package($package) { // we will override package file with our own package $package = $this->get_downloaded_package_url(); if (is_wp_error($package)) { return $package; } return parent::download_package($package); }
public function download_package($package) { $package = $this->get_downloaded_package_url(); if (is_wp_error($package)) { return $package; } return parent::download_package($package); }