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.

Метод класса: WC_Helper_Updater{}

Хуков нет.

Возвращает

null..

Использование

$result = WC_Helper_Updater::setup_update_plugins_messages();

Код WC_Helper_Updater::setup_update_plugins_messages() WC 9.4.2

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' ) );
		}
	}
}