WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin\Notes

WC_Admin_Notes_Install_JP_And_WCS_Plugins::action_note() public WC 1.0

Action the Install Jetpack and WooCommerce Shipping & Tax note, if any exists, and as long as both the Jetpack and WooCommerce Shipping & Tax plugins have been activated.

{} Это метод класса: WC_Admin_Notes_Install_JP_And_WCS_Plugins{}

Хуков нет.

Возвращает

Null. Ничего.

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

$result = WC_Admin_Notes_Install_JP_And_WCS_Plugins::action_note();

Код WC_Admin_Notes_Install_JP_And_WCS_Plugins::action_note() WC 4.7.1

<?php
public static function action_note() {
	// Make sure that both plugins are active before actioning the note.
	$active_plugin_slugs = PluginsHelper::get_active_plugin_slugs();
	$jp_active           = in_array( 'jetpack', $active_plugin_slugs, true );
	$wcs_active          = in_array( 'woocommerce-services', $active_plugin_slugs, true );

	if ( ! $jp_active || ! $wcs_active ) {
		return;
	}

	// Action any notes with a matching name.
	$data_store = \WC_Data_Store::load( 'admin-note' );
	$note_ids   = $data_store->get_notes_with_name( self::NOTE_NAME );

	foreach ( $note_ids as $note_id ) {
		$note = WC_Admin_Notes::get_note( $note_id );

		if ( $note ) {
			$note->set_status( WC_Admin_Note::E_WC_ADMIN_NOTE_ACTIONED );
			$note->save();
		}
	}
}