Fixed a typo

This commit is contained in:
Claudio Sanches 2016-07-19 09:37:42 -03:00
parent 8d5f0d5c11
commit aa367efdf0
1 changed files with 3 additions and 3 deletions

View File

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