From 80a8d66106941fb567dd64a63a86bc18366f3223 Mon Sep 17 00:00:00 2001 From: Kathy Daring Date: Thu, 7 Jan 2021 15:00:14 -0700 Subject: [PATCH] Replace jQuery.submit() --- assets/js/admin/meta-boxes-product-variation.js | 4 ++-- assets/js/admin/wc-setup.js | 6 +++--- assets/js/frontend/woocommerce.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/js/admin/meta-boxes-product-variation.js b/assets/js/admin/meta-boxes-product-variation.js index dc45f7a2012..1dfc880e598 100644 --- a/assets/js/admin/meta-boxes-product-variation.js +++ b/assets/js/admin/meta-boxes-product-variation.js @@ -547,9 +547,9 @@ jQuery( function( $ ) { callerid = postForm.data( 'callerid' ); if ( 'publish' === callerid ) { - postForm.append('').submit(); + postForm.append('').trigger( 'submit' ); } else { - postForm.append('').submit(); + postForm.append('').trigger( 'submit' ); } }, diff --git a/assets/js/admin/wc-setup.js b/assets/js/admin/wc-setup.js index 1484fda1f7b..2f846e60e37 100644 --- a/assets/js/admin/wc-setup.js +++ b/assets/js/admin/wc-setup.js @@ -37,7 +37,7 @@ jQuery( function( $ ) { } ); $( document.body ).on( 'wc_backbone_modal_response', function() { - form.unbind( 'submit' ).submit(); + form.unbind( 'submit' ).trigger( 'submit' ); } ); $( '#wc_tracker_checkbox_dialog' ).on( 'change', function( e ) { @@ -46,7 +46,7 @@ jQuery( function( $ ) { } ); $( '#wc_tracker_submit' ).on( 'click', function () { - form.unbind( 'submit' ).submit(); + form.unbind( 'submit' ).trigger( 'submit' ); } ); return true; @@ -182,7 +182,7 @@ jQuery( function( $ ) { } ); function submitActivateForm() { - $( 'form.activate-jetpack' ).submit(); + $( 'form.activate-jetpack' ).trigger( 'submit' ); } function waitForJetpackInstall() { diff --git a/assets/js/frontend/woocommerce.js b/assets/js/frontend/woocommerce.js index f09329fe6a4..169ac858226 100644 --- a/assets/js/frontend/woocommerce.js +++ b/assets/js/frontend/woocommerce.js @@ -2,7 +2,7 @@ jQuery( function( $ ) { // Orderby $( '.woocommerce-ordering' ).on( 'change', 'select.orderby', function() { - $( this ).closest( 'form' ).submit(); + $( this ).closest( 'form' ).trigger( 'submit' ); }); // Target quantity inputs on product pages