1(function ($) { 2 'use strict'; 3 $(document).ready(function () { 4 $('.woocommerce-billing-fields input, .woocommerce-billing-fields select, .woocommerce-billing-fields textarea,.woocommerce-shipping-fields input, .woocommerce-shipping-fields select, .woocommerce-shipping-fields textarea').on('change', function() { 5 $('body').trigger('update_checkout'); 6 }); 7 8 function conditional_payments_trigger() { 9 if ( typeof dscpw_conditional_payments_settings !== 'undefined' ) { 10 $.each( dscpw_conditional_payments_settings.name_address_fields, function( index, value ) { 11 $( document.body ).on( 'change', 'input[name="' + value + '"]', function() { 12 $( document.body ).trigger( 'update_checkout' ); 13 } ); 14 15 if ( value.indexOf('shipping_') !== -1 ) { 16 var billingValue = value.replace( 'shipping', 'billing' ); 17 if ( $.inArray( billingValue, dscpw_conditional_payments_settings.name_address_fields ) === -1 ) { 18 $( document.body ).on( 'change', 'input[name="' + billingValue + '"]', function() { 19 $( document.body ).trigger( 'update_checkout' ); 20 } ); 21 } 22 } 23 if ( 'previous_order' === value ) { 24 $( document.body ).on( 'change', 'input[name="billing_email"]', function() { 25 $( document.body ).trigger( 'update_checkout' ); 26 } ); 27 } 28 } ); 29 } 30 } 31 conditional_payments_trigger(); 32 33 }); 34})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.