Done !
Server IP : 162.0.217.223 / Your IP : 216.73.216.168 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/public_html/wp-content/plugins/woo-stripe-payment/assets/js/frontend/ |
Upload File : |
(function($) { function minimalist() { this.index = 1; this.total_steps = $('.wc-stripe-steps').data('steps'); this.updateSteppers(); this.updateStyles(); $(document.body).on('click', '.wc-stripe-back', this.prev.bind(this)) .on('click', '.wc-stripe-next', this.next.bind(this)) .on('updated_checkout', this.updated_checkout.bind(this)); } minimalist.prototype.next = function(e) { e.preventDefault(); this.index++; $('.wc-stripe-minimalist-form .field-container[data-index="' + this.index + '"]').removeClass('field-container--hidden'); $('.wc-stripe-minimalist-form .field-container[data-index="' + (this.index - 1) + '"]').addClass('field-container--hidden'); this.updateSteppers(); } minimalist.prototype.prev = function(e) { e.preventDefault(); this.index--; $('.wc-stripe-minimalist-form .field-container[data-index="' + (this.index + 1) + '"]').addClass('field-container--hidden'); $('.wc-stripe-minimalist-form .field-container[data-index="' + this.index + '"]').removeClass('field-container--hidden'); this.updateSteppers(); } minimalist.prototype.updateText = function() { var text = $('.wc-stripe-step').data('text'); $('.wc-stripe-step').text(text.replace('%s', this.index)); } minimalist.prototype.updateSteppers = function() { if (this.index == 1) { $('.wc-stripe-back').hide(); } else if (this.index == this.total_steps) { $('.wc-stripe-next').hide(); } else { $('.wc-stripe-next').show(); $('.wc-stripe-back').show(); } this.updateText(); } minimalist.prototype.updated_checkout = function() { $('.wc-stripe-minimalist-form .field-container[data-index="' + this.index + '"]').removeClass('field-container--hidden'); this.updateSteppers(); this.updateStyles(); } minimalist.prototype.updateStyles = function() { if (wc_stripe.credit_card) { var width = $('ul.payment_methods').outerWidth(); if ($('ul.payment_methods').outerWidth() < 400) { var options = { style: { base: { fontSize: '18px' } } }; wc_stripe.credit_card.cardNumber.update(options); wc_stripe.credit_card.cardExpiry.update(options); wc_stripe.credit_card.cardCvc.update(options); $('ul.payment_methods').addClass('wc-stripe-sm'); } } } new minimalist(); }(jQuery))