WC_Helper_Updater::setup_update_plugins_messages()public staticWC 1.0

Runs on load-plugins.php, adds a hook to show a custom plugin update message for WooCommerce.com hosted plugins.

Method of the class: WC_Helper_Updater{}

No Hooks.

Return

null..

Usage

$result = WC_Helper_Updater::setup_update_plugins_messages();

WC_Helper_Updater::setup_update_plugins_messages() code WC 8.9.0

public static function setup_update_plugins_messages() {
	$is_site_connected = WC_Helper::is_site_connected();
	foreach ( WC_Helper::get_local_woo_plugins() as $plugin ) {
		$filename = $plugin['_filename'];
		if ( $is_site_connected ) {
			add_action( 'in_plugin_update_message-' . $filename, array( __CLASS__, 'add_install_marketplace_plugin_message' ), 10, 2 );
		} else {
			add_action( 'in_plugin_update_message-' . $filename, array( __CLASS__, 'add_connect_woocom_plugin_message' ) );
		}
	}
}