From 5a0ad572d72c665803fbdfc4727d694644b9255c Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Sat, 14 Nov 2020 16:24:14 -0300 Subject: [PATCH] Remove leftover jQuery code related to old shipping settings This commit removes a jQuery code that is not used anymore. Each shipping method in WooCommerce until 2.6.0 had a setting called "Availability" that could be set to either "All allowed countries" or "Specific countries". The jQuery code removed in this commit was used to show or hide another setting called "Specific countries" that was only visible when "Availability" was set to "Specific countries". When shipping methods were refactored for 2.6.0 and the "Availability" code was removed in #9826, we forgot to remove the related jQuery code that I found today when working on making sure our JS code is compatible with jQuery 3. --- assets/js/admin/woocommerce_admin.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/assets/js/admin/woocommerce_admin.js b/assets/js/admin/woocommerce_admin.js index ecae72492e5..8f52e9cb4ff 100644 --- a/assets/js/admin/woocommerce_admin.js +++ b/assets/js/admin/woocommerce_admin.js @@ -308,15 +308,6 @@ return false; }); - // Select availability - $( 'select.availability' ).change( function() { - if ( $( this ).val() === 'all' ) { - $( this ).closest( 'tr' ).next( 'tr' ).hide(); - } else { - $( this ).closest( 'tr' ).next( 'tr' ).show(); - } - }).change(); - // Hidden options $( '.hide_options_if_checked' ).each( function() { $( this ).find( 'input:eq(0)' ).change( function() {