Merge pull request #4051 from expsa/ENS-3613

[FIX] applepay_fast_checkout: select first element
This commit is contained in:
abdurrahman-saber 2025-07-29 15:54:13 +03:00 committed by GitHub
commit baeede2ca5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ var wpwlOptions = {
let applepayButton = $("apple-pay-button"); let applepayButton = $("apple-pay-button");
let totalAmount = $("#order_total > td.text-xl-right > strong", window.parent.document); let totalAmount = $("#order_total > td.text-xl-right > strong", window.parent.document);
if (totalAmount && totalAmount.length > 0){ if (totalAmount && totalAmount.length > 0){
totalAmount = totalAmount[0].text().replaceAll(",", ""); totalAmount = $(totalAmount[0]).text().replaceAll(",", "");
} }
window.wpwlOptions.applePay.total.amount = totalAmount; window.wpwlOptions.applePay.total.amount = totalAmount;
console.log("Apple Pay Amount updated to:", window.wpwlOptions.applePay.total.amount); console.log("Apple Pay Amount updated to:", window.wpwlOptions.applePay.total.amount);