Make notices in Gutenberg within an AJAX running
-
Hello,
I’ve a PHP running with AJAX, and I’m wondering how to make notices in Gutenberg.I’ve a JS with this code to run the notice:
( function( wp ) { wp.data.dispatch('core/notices').createNotice( 'error', 'Message of error', { isDismissible: true, actions: [ { url: '#', label: 'Button' } ] } ); } )( window.wp );
But I don’t know how to make it run, maybe with a variable or something.
How could make it work?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Make notices in Gutenberg within an AJAX running’ is closed to new replies.