From 530a1ac0e364438b1c77ce5a9177f8ae5399bfc5 Mon Sep 17 00:00:00 2001 From: shewa12 Date: Mon, 14 Oct 2024 19:22:03 +0600 Subject: [PATCH] Tax calculation condition updated on the checkout details page --- ecommerce/Tax.php | 4 ++++ readme.txt | 1 + templates/ecommerce/checkout-details.php | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ecommerce/Tax.php b/ecommerce/Tax.php index 7d2842c56..8ac19fa79 100644 --- a/ecommerce/Tax.php +++ b/ecommerce/Tax.php @@ -122,6 +122,10 @@ public static function get_setting( $key, $default = false ) { * @return float */ public static function calculate_tax( $amount, $rate ) { + if ( 0 === $rate ) { + return $rate; + } + if ( self::is_tax_included_in_price() ) { // Tax = (Tax Rate X Price) / (1 + Tax Rate). $tax = $amount - ( $rate * $amount ) / ( 1 + $rate ); diff --git a/readme.txt b/readme.txt index 88c2ac5f8..d850787a0 100644 --- a/readme.txt +++ b/readme.txt @@ -289,6 +289,7 @@ All of these Tutor LMS features allow the users to design a more powerful and di Update: Implemented tax calculation on the checkout page. Update: Added clear discount breakdown in order details. Update: Displayed payment gateway names on frontend and backend order pages. +Update: Checkout page payment method list design updated. Fix: Resolved issue preventing permanent order deletion. Fix: Addressed course/bundle assignment issue when updating automatic coupons. Fix: Fixed PHP fatal error related to course intro video source. diff --git a/templates/ecommerce/checkout-details.php b/templates/ecommerce/checkout-details.php index f2d24178a..ae4077b56 100644 --- a/templates/ecommerce/checkout-details.php +++ b/templates/ecommerce/checkout-details.php @@ -264,7 +264,7 @@ 0 && ! $is_tax_included_in_price ) : ?>
@@ -286,7 +286,7 @@
0 && $is_tax_included_in_price ) : ?>