Skip to content

Commit 5e80533

Browse files
chore: bump supported supported WooCommerce version
1 parent f3f0fb3 commit 5e80533

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

assets/js/wcdp.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jQuery(function ($) {
99
) {
1010
triggerCheckoutUpdate();
1111
}
12-
}
12+
},
1313
);
1414

1515
if (!document.querySelector(".wcdp-form")) return;
@@ -47,7 +47,7 @@ jQuery(function ($) {
4747
error_message(
4848
response.message,
4949
response.reload,
50-
response.newParams
50+
response.newParams,
5151
);
5252
break;
5353
}
@@ -130,7 +130,7 @@ jQuery(function ($) {
130130
function focusFirstFocusableInStep(stepEl) {
131131
stepEl
132132
.querySelector(
133-
'input:not([disabled]):not([type="hidden"]), button:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])'
133+
'input:not([disabled]):not([type="hidden"]), button:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])',
134134
)
135135
?.focus();
136136
}
@@ -143,7 +143,7 @@ jQuery(function ($) {
143143
function error_message(
144144
message = "An unexpected error occurred. Please reload the page and try again. If the problem persists, please contact our support team.",
145145
reload = true,
146-
newParams = false
146+
newParams = false,
147147
) {
148148
if (!reload) {
149149
$("#wcdp-ajax-button").show();
@@ -152,14 +152,14 @@ jQuery(function ($) {
152152
alert(message);
153153
let currentUrl = new URL(window.location.href);
154154
Object.entries(newParams).forEach(([key, value]) =>
155-
currentUrl.searchParams.set(key, value)
155+
currentUrl.searchParams.set(key, value),
156156
);
157157
window.location.href = currentUrl.toString();
158158
}
159159
$("#wcdp-spinner").hide();
160160
$("#wcdp-ajax-error").remove();
161161
$("form.checkout.woocommerce-checkout").prepend(
162-
'<ul class="woocommerce-error" id="wcdp-ajax-error" role="alert"><li></li></ul>'
162+
'<ul class="woocommerce-error" id="wcdp-ajax-error" role="alert"><li></li></ul>',
163163
);
164164
$("#wcdp-ajax-error li").text(message);
165165
}
@@ -195,7 +195,7 @@ jQuery(function ($) {
195195
}
196196
}, 1300);
197197
}
198-
}
198+
},
199199
);
200200

201201
/**
@@ -205,7 +205,7 @@ jQuery(function ($) {
205205
let currentprice = 0;
206206
$(".wcdp-body")?.on("input blur keyup paste change load", function () {
207207
const button = document.querySelector(
208-
".wcdp-body .single_add_to_cart_button"
208+
".wcdp-body .single_add_to_cart_button",
209209
);
210210
const form = document.querySelector("#wcdp-get-send");
211211
if (button && form && form.checkValidity()) {
@@ -214,7 +214,7 @@ jQuery(function ($) {
214214
button.classList.add("disabled");
215215
}
216216
$(".wcdp-express-amount").val(
217-
$('input[name="wcdp-donation-amount"]').val()
217+
$('input[name="wcdp-donation-amount"]').val(),
218218
);
219219
expresstime++;
220220
setTimeout(function () {
@@ -381,7 +381,7 @@ jQuery(function ($) {
381381
history.pushState(
382382
"",
383383
document.title,
384-
window.location.pathname + window.location.search
384+
window.location.pathname + window.location.search,
385385
);
386386
wcdpOpen = false;
387387
}
@@ -406,7 +406,7 @@ jQuery(function ($) {
406406
let $range = $(this);
407407
let formId = $range.closest("form").data("formid");
408408
let $amount = $(
409-
`form[data-formid="${formId}"] .wcdp_donation_amount_field`
409+
`form[data-formid="${formId}"] .wcdp_donation_amount_field`,
410410
);
411411

412412
if ($amount.length) {
@@ -435,7 +435,7 @@ jQuery(function ($) {
435435

436436
inputs.forEach((input) => {
437437
const matchingOption = this.querySelector(
438-
`select option[value="${input.value}"]`
438+
`select option[value="${input.value}"]`,
439439
);
440440
if (!matchingOption || !matchingOption.classList.contains("attached"))
441441
return;
@@ -454,13 +454,13 @@ jQuery(function ($) {
454454

455455
// copy amount from selectedAmount input field
456456
const selectedAmount = this.querySelector(
457-
".wcdp_amount_suggestion:checked"
457+
".wcdp_amount_suggestion:checked",
458458
);
459459
const amountInput = this.querySelector(
460-
'input[name="wcdp-donation-amount"]'
460+
'input[name="wcdp-donation-amount"]',
461461
);
462462
const amountAttributeInput = this.querySelector(
463-
'input[name="attribute_wcdp_donation_amount"]'
463+
'input[name="attribute_wcdp_donation_amount"]',
464464
);
465465
if (selectedAmount && amountInput) {
466466
amountInput.value = selectedAmount.value;

wc-donation-platform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Text Domain: wc-donation-platform
1313
* Domain Path: /languages
1414
* WC requires at least: 4.0.0
15-
* WC tested up to: 10.3.5
15+
* WC tested up to: 10.4.3
1616
* Requires at least: 5.8
1717
*/
1818

0 commit comments

Comments
 (0)