geno/wp-content/plugins/woocommerce/assets/js/frontend/credit-card-form.js

14 lines
588 B
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
jQuery( function( $ ) {
$( '.wc-credit-card-form-card-number' ).payment( 'formatCardNumber' );
$( '.wc-credit-card-form-card-expiry' ).payment( 'formatCardExpiry' );
$( '.wc-credit-card-form-card-cvc' ).payment( 'formatCardCVC' );
$( document.body )
.on( 'updated_checkout wc-credit-card-form-init', function() {
$( '.wc-credit-card-form-card-number' ).payment( 'formatCardNumber' );
$( '.wc-credit-card-form-card-expiry' ).payment( 'formatCardExpiry' );
$( '.wc-credit-card-form-card-cvc' ).payment( 'formatCardCVC' );
})
.trigger( 'wc-credit-card-form-init' );
} );