Include the corresponding note in triggered action hook.

This commit is contained in:
Jeff Stieler 2019-05-24 15:29:18 -04:00
parent 17d793d731
commit 698f947c16
1 changed files with 6 additions and 5 deletions

View File

@ -86,16 +86,17 @@ class WC_Admin_REST_Admin_Note_Action_Controller extends WC_Admin_REST_Admin_Not
* Fires when an admin note action is taken.
*
* @param string $name The triggered action name.
* @param object $action The triggered action.
* @param WC_Admin_Note $note The corresponding Note.
*/
do_action( 'woocommerce_admin_note_action', $triggered_action->name, $triggered_action );
do_action( 'woocommerce_admin_note_action', $triggered_action->name, $note );
/**
* Fires when an admin note action is taken.
*
* For more specific targeting of note actions.
*
* @param WC_Admin_Note $note The corresponding Note.
*/
do_action( 'woocommerce_admin_note_action_' . $triggered_action->name );
do_action( 'woocommerce_admin_note_action_' . $triggered_action->name, $note );
// Update the note with the status for this action.
$note->set_status( $triggered_action->status );