Merge pull request #29510 from woocommerce/fix/29359

Prevent saved changes message when leaving page closes #29359
This commit is contained in:
Barry Hughes 2021-03-30 07:09:00 -07:00 committed by GitHub
commit 90d9dce1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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 );
} }