Fixed a typo
This commit is contained in:
parent
8d5f0d5c11
commit
aa367efdf0
|
@ -109,7 +109,7 @@ class WC_Shipping_Free_Shipping extends WC_Shipping_Method {
|
|||
public function get_instance_form_fields() {
|
||||
wc_enqueue_js( "
|
||||
jQuery( function( $ ) {
|
||||
function wcFreeShippingShowHideminAmountField( el ) {
|
||||
function wcFreeShippingShowHideMinAmountField( el ) {
|
||||
var form = $( el ).closest( 'form' );
|
||||
var minAmountField = $( '#woocommerce_free_shipping_min_amount', form ).closest( 'tr' );
|
||||
if ( 'coupon' === $( el ).val() || '' === $( el ).val() ) {
|
||||
|
@ -120,14 +120,14 @@ class WC_Shipping_Free_Shipping extends WC_Shipping_Method {
|
|||
}
|
||||
|
||||
$( document.body ).on( 'change', '#woocommerce_free_shipping_requires', function() {
|
||||
wcFreeShippingShowHideminAmountField( this );
|
||||
wcFreeShippingShowHideMinAmountField( this );
|
||||
});
|
||||
|
||||
// Change while load.
|
||||
$( '#woocommerce_free_shipping_requires' ).change();
|
||||
$( document.body ).on( 'wc_backbone_modal_loaded', function( evt, target ) {
|
||||
if ( 'wc-modal-shipping-method-settings' === target ) {
|
||||
wcFreeShippingShowHideminAmountField( $( '#wc-backbone-modal-dialog #woocommerce_free_shipping_requires', evt.currentTarget ) );
|
||||
wcFreeShippingShowHideMinAmountField( $( '#wc-backbone-modal-dialog #woocommerce_free_shipping_requires', evt.currentTarget ) );
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue