WC_Helper_Updater::display_connect_notice_for_woo_plugins
Runs on after_plugin_row, show a connect message on WooCommerce.com plugin rows that Core renders no update notice for.
Core only renders its update row -- and with it the message appended by add_connect_woocom_plugin_message() -- when an update is pending, so an up-to-date plugin gives an unconnected store no indication that it won't receive updates.
Method of the class: WC_Helper_Updater{}
No Hooks.
Returns
void. Nothing (null).
Usage
$result = WC_Helper_Updater::display_connect_notice_for_woo_plugins( $plugin_file, $plugin_data ): void;
- $plugin_file(string) (required)
- Path to the plugin file relative to the plugins directory.
- $plugin_data(array) (required)
- An array of plugin metadata.
Changelog
| Since 11.2.0 | Introduced. |
WC_Helper_Updater::display_connect_notice_for_woo_plugins() WC Helper Updater::display connect notice for woo plugins code WC 11.2.2
public static function display_connect_notice_for_woo_plugins( $plugin_file, $plugin_data ): void {
if ( 0 === self::get_product_id_for_plugin_row_notice( $plugin_file, $plugin_data ) ) {
return;
}
self::print_plugin_row_notice( $plugin_file, 'woo-connect-notice', self::get_connect_notice( self::CAMPAIGN_PLUGIN_ROW ) );
}