woocommerce_note_action_(triggered_action_name) хук-событиеWC 1.0

Fires when an admin note action is taken. For more specific targeting of note actions.

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

add_action( 'woocommerce_note_action_(triggered_action_name)', 'wp_kama_woocommerce_note_action_triggered_name_action' );

/**
 * Function for `woocommerce_note_action_(triggered_action_name)` action-hook.
 * 
 * @param Note $note The corresponding Note.
 *
 * @return void
 */
function wp_kama_woocommerce_note_action_triggered_name_action( $note ){

	// action...
}
$note(Note)
The corresponding Note.

Где вызывается хук

Notes::trigger_note_action()
woocommerce_note_action_(triggered_action_name)
woocommerce/src/Admin/Notes/Notes.php 360
do_action( 'woocommerce_note_action_' . $triggered_action->name, $note );

Где используется хук в WooCommerce

woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php 37
add_action( 'woocommerce_note_action_install-jp-and-wcs-plugins', array( $this, 'install_jp_and_wcs_plugins' ) );
woocommerce/src/Internal/Admin/Notes/TrackingOptIn.php 33
add_action( 'woocommerce_note_action_tracking-opt-in', array( $this, 'opt_in_to_tracking' ) );