Skip to content

Commit

Permalink
πŸ› Fix the 0-amount bug
Browse files Browse the repository at this point in the history
When shipping is disabled, the shippingFee is `undefined` which also resulted in the amount to become `NaN`
  • Loading branch information
stracker-phil committed Sep 18, 2024
1 parent 368ad49 commit 643a23c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/ppcp-googlepay/resources/js/Helper/TransactionInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 643a23c

Please sign in to comment.