Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
add clearAllNotices action to useCheckoutNotices hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
nerrad committed Dec 20, 2019
1 parent 659f359 commit 103a61d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/js/base/hooks/checkout/use-checkout-notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ const useCheckoutNotices = () => {
const addNotice = ( notice ) => {
updateNotices( ( originalNotices ) => [ ...originalNotices, notice ] );
};
const removeNotice = ( notice ) => {
const clearAllNotices = () => {
// @todo...figure out how notices are saved - might need unique ids?
// Do we have a special notice creator that takes care of that?
// Use wp notice api?
return notice;
updateNotices( [] );
};
return {
notices,
addNotice,
removeNotice,
clearAllNotices,
};
};

Expand Down

0 comments on commit 103a61d

Please sign in to comment.