Only update the status of a note if the triggered action is non-empty.
This commit is contained in:
parent
22cdec7e57
commit
4ae938c99d
|
@ -99,7 +99,10 @@ class WC_Admin_REST_Admin_Note_Action_Controller extends WC_Admin_REST_Admin_Not
|
|||
do_action( 'woocommerce_admin_note_action_' . $triggered_action->name, $note );
|
||||
|
||||
// Update the note with the status for this action.
|
||||
if ( ! empty( $triggered_action->status ) ) {
|
||||
$note->set_status( $triggered_action->status );
|
||||
}
|
||||
|
||||
$note->save();
|
||||
|
||||
$data = $note->get_data();
|
||||
|
|
Loading…
Reference in New Issue