Closed
Description
When using wp.data.dispatch( 'core/notices' ).createInfoNotice
and trying to pass a function for the onDismiss
option, the function is not triggered when the notice is dismissed.
Typing something like wp.data.dispatch( 'core/notices' ).createInfoNotice( 'hello', { onDismiss: () => { console.log( 'dismissed!' ) } } );
is not logging anything in the console, when the created notice is dismissed.
Further information can be found here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment