mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix the product price amount calculation
This commit is contained in:
parent
9f1231412b
commit
fbc20c35ea
1 changed files with 2 additions and 2 deletions
|
@ -48,8 +48,8 @@ class SingleProductBootstap {
|
|||
else if (document.querySelector('form.cart .woocommerce-Price-amount')) {
|
||||
priceText = document.querySelector('form.cart .woocommerce-Price-amount').innerText;
|
||||
}
|
||||
else if (document.querySelector('.woocommerce-Price-amount')) {
|
||||
priceText = document.querySelector('.woocommerce-Price-amount').innerText;
|
||||
else if (document.querySelector('.product .woocommerce-Price-amount')) {
|
||||
priceText = document.querySelector('.product .woocommerce-Price-amount').innerText;
|
||||
}
|
||||
const amount = parseFloat(priceText.replace(/([^\d,\.\s]*)/g, ''));
|
||||
return amount === 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue