From 72b3b5055ba15ee76845bf1c8f5d9ceb13291405 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 16 Nov 2017 12:03:02 +0000 Subject: [PATCH] FIx variable in get_object_subtotal --- includes/class-wc-discounts.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-discounts.php b/includes/class-wc-discounts.php index 3dac525d52a..158bd4d5383 100644 --- a/includes/class-wc-discounts.php +++ b/includes/class-wc-discounts.php @@ -853,7 +853,7 @@ class WC_Discounts { protected function get_object_subtotal() { if ( is_a( $this->object, 'WC_Cart' ) ) { return wc_add_number_precision( $this->object->get_displayed_subtotal() ); - } elseif ( is_a( $object, 'WC_Order' ) ) { + } elseif ( is_a( $this->object, 'WC_Order' ) ) { return wc_add_number_precision( $this->object->get_subtotal() ); } else { return array_sum( wp_list_pluck( $this->items, 'price' ) );