abort preventiont of publication if address country invalid

This commit is contained in:
lenovo
2022-11-09 09:30:49 +01:00
parent 73d988eb6a
commit d326b6f51e
2 changed files with 87 additions and 59 deletions

View File

@@ -0,0 +1,21 @@
console.log("publish error");
wp.data.dispatch( 'core/notices' ).createNotice(
'error', // Can be one of: success, info, warning, error.
'impossible de publier : le pays est invalide', // Text string to display.
{
isDismissible: true, // Whether the user can dismiss the notice.
}
);
//( function ( wp ) {
// console.log("publish error");
// wp.data.dispatch( 'core/notices' ).createNotice(
// 'error', // Can be one of: success, info, warning, error.
// 'impossible de publie : le pays est invalide', // Text string to display.
// {
// isDismissible: true, // Whether the user can dismiss the notice.
// }
// );
//} )( window.wp );