From 6a4b25d8fda0f5c1ec3acdd4ea6693d84806c58e Mon Sep 17 00:00:00 2001 From: Jason Coleman <33220397+ideadude@users.noreply.github.com> Date: Thu, 14 Jul 2022 10:30:22 -0400 Subject: [PATCH] Update class.memberorder.php In saveOrder when we check if the tax has be set, we check if isset() and if the tax is defaulted to 0, that's going to return true, which would lead to us calculating taxes every time the order is saved, which could be costly if we're hitting an API to calculate taxes. So I set the tax property to default to null. --- classes/class.memberorder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/class.memberorder.php b/classes/class.memberorder.php index e2b89f629..ca3e1addf 100644 --- a/classes/class.memberorder.php +++ b/classes/class.memberorder.php @@ -80,7 +80,7 @@ class MemberOrder * * @var float */ - private $tax = 0.00; + private $tax = null; /** * Discount Code Amount