WC_Helper_Updater::get_product_page_url
WooCommerce.com product page URL for a plugin, from the update data Core already holds.
Method of the class: WC_Helper_Updater{}
No Hooks.
Returns
string. The product page URL, or an empty string when the update data carries none.
Usage
$result = WC_Helper_Updater::get_product_page_url( $plugin_file ): string;
- $plugin_file(string) (required)
- Path to the plugin file relative to the plugins directory.
Changelog
| Since 11.2.0 | Introduced. |
WC_Helper_Updater::get_product_page_url() WC Helper Updater::get product page url code WC 11.2.2
private static function get_product_page_url( $plugin_file ): string {
$updates = get_site_transient( 'update_plugins' );
return self::get_product_page_url_from_update_response( $updates->no_update[ $plugin_file ] ?? $updates->response[ $plugin_file ] ?? null );
}