Skip to content

Commit

Permalink
Fix: Permanently delete post action does not calls onActionPerformed. (
Browse files Browse the repository at this point in the history
…WordPress#63121)

Co-authored-by: jorgefilipecosta <[email protected]>
  • Loading branch information
jorgefilipecosta and jorgefilipecosta authored Jul 4, 2024
1 parent bd8a937 commit d51d7e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/src/components/post-actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ const permanentlyDeletePostAction = {
isEligible( { status } ) {
return status === 'trash';
},
async callback( posts, { registry } ) {
async callback( posts, { registry, onActionPerformed } ) {
const { createSuccessNotice, createErrorNotice } =
registry.dispatch( noticesStore );
const { deleteEntityRecord } = registry.dispatch( coreStore );
Expand Down Expand Up @@ -307,6 +307,7 @@ const permanentlyDeletePostAction = {
type: 'snackbar',
id: 'permanently-delete-post-action',
} );
onActionPerformed?.( posts );
} else {
// If there was at lease one failure.
let errorMessage;
Expand Down

0 comments on commit d51d7e5

Please sign in to comment.