Automattic\WooCommerce\Blueprint\ResourceStorages
OrgThemeResourceStorage::get_download_link
Get the download link.
Method of the class: OrgThemeResourceStorage{}
No Hooks.
Returns
String|null
. The download link.
Usage
// protected - for code of main (parent) or child class $result = $this->get_download_link( $slug ): ?string;
- $slug(string) (required)
- The slug of the theme to be downloaded.
OrgThemeResourceStorage::get_download_link() OrgThemeResourceStorage::get download link code WC 9.9.5
protected function get_download_link( $slug ): ?string { $info = $this->wp_themes_api( 'theme_information', array( 'slug' => $slug, 'fields' => array( 'sections' => false, ), ) ); if ( is_wp_error( $info ) ) { return null; } if ( isset( $info->download_link ) ) { return $info->download_link; } return null; }