jQuery( function( $ ) {
	$( '.kkart-credit-card-form-card-number' ).payment( 'formatCardNumber' );
	$( '.kkart-credit-card-form-card-expiry' ).payment( 'formatCardExpiry' );
	$( '.kkart-credit-card-form-card-cvc' ).payment( 'formatCardCVC' );

	$( document.body )
		.on( 'updated_checkout kkart-credit-card-form-init', function() {
			$( '.kkart-credit-card-form-card-number' ).payment( 'formatCardNumber' );
			$( '.kkart-credit-card-form-card-expiry' ).payment( 'formatCardExpiry' );
			$( '.kkart-credit-card-form-card-cvc' ).payment( 'formatCardCVC' );
		})
		.trigger( 'kkart-credit-card-form-init' );
} );
