PluginProbe
seQura / 2.0.9
seQura v2.0.9
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / templates / checkout-script.php

checkout-script.php in seQura 2.0.9, at templates/checkout-script.php

33 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Script for the checkout page.
4 *
5 * @package woocommerce-sequra
6 */
7
8 // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
9 ?>
10 <script>
11 jQuery('.payment_method_sequra').show();
12 if (typeof window.sq_product_campaign === 'undefined') {
13 window.sq_product_campaign = jQuery('input[name=sq_product_campaign]:first').val()
14 }
15 jQuery('input[value=' + sq_product_campaign + ']').prop('checked', true);
16 jQuery('#payment_method_sequra').removeClass('input-radio').hide();
17 jQuery('label[for=payment_method_sequra').hide();
18 jQuery('div.payment_method_sequra').removeClass('payment_box');
19 jQuery('input[name=sq_product_campaign]').on('click', function () {
20 jQuery('#payment_method_sequra').prop('checked', true).click();
21 window.sq_product_campaign = jQuery(this).val();
22 jQuery('input[name="payment_method"]').trigger('change');
23 });
24 jQuery('input.input-radio:not(.sq-input-radio)').on('click', function () {
25 jQuery('input[name=sq_product_campaign]').prop('checked', false);
26 });
27 jQuery(document.body).on('update_checkout', function (e) {
28 jQuery('.payment_method_sequra').show();
29 jQuery('#payment_method_sequra').removeClass('input-radio').hide();
30 });
31 Sequra.onLoad(function () { Sequra.refreshComponents(); });
32 </script>
33