mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
🐛 Fix the 0-amount bug
When shipping is disabled, the shippingFee is `undefined` which also resulted in the amount to become `NaN`
This commit is contained in:
parent
368ad49d16
commit
643a23c6e0
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,8 @@ export default class TransactionInfo {
|
|||
this.#country = country;
|
||||
this.#currency = currency;
|
||||
|
||||
shippingFee = this.toAmount( shippingFee );
|
||||
total = this.toAmount( total );
|
||||
this.shippingFee = shippingFee;
|
||||
this.amount = total - shippingFee;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue