Merge pull request #29510 from woocommerce/fix/29359
Prevent saved changes message when leaving page closes #29359
This commit is contained in:
commit
90d9dce1f4
|
@ -62,6 +62,9 @@
|
||||||
shippingMethod.trigger( 'change:methods' );
|
shippingMethod.trigger( 'change:methods' );
|
||||||
shippingMethod.changes = {};
|
shippingMethod.changes = {};
|
||||||
shippingMethod.trigger( 'saved:methods' );
|
shippingMethod.trigger( 'saved:methods' );
|
||||||
|
|
||||||
|
// Overrides the onbeforeunload callback added by settings.js.
|
||||||
|
window.onbeforeunload = null;
|
||||||
} else {
|
} else {
|
||||||
window.alert( data.strings.save_failed );
|
window.alert( data.strings.save_failed );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue