Skip to content

Commit a76fdd1

Browse files
committed
Remove without_tax references
1 parent fca78f6 commit a76fdd1

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/Helper.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,17 @@ class Helper
1313
public static function isConsistentCart($cart)
1414
{
1515
$totals = self::totals($cart);
16-
if ( ! isset($cart['order_total_without_tax'])) {
17-
$cart['order_total_without_tax'] = $totals['without_tax'];
18-
}
19-
20-
return $cart['order_total_without_tax'] == $totals['without_tax'] && $cart['order_total_with_tax'] == $totals['with_tax'];
16+
return $cart['order_total_with_tax'] == $totals['with_tax'];
2117
}
2218

2319
public static function totals($cart)
2420
{
25-
$total_without_tax = $total_with_tax = 0;
21+
$total_with_tax = 0;
2622
foreach ($cart['items'] as $item) {
27-
$total_without_tax += isset($item['total_without_tax']) ? $item['total_without_tax'] : $item['total_with_tax'];
2823
$total_with_tax += $item['total_with_tax'];
2924
}
3025

31-
return array('without_tax' => $total_without_tax, 'with_tax' => $total_with_tax);
26+
return array('with_tax' => $total_with_tax);
3227
}
3328

3429
public static function removeNulls($data)
@@ -74,4 +69,4 @@ public static function sign($value, $pass)
7469

7570
return sha1($value . $pass);
7671
}
77-
}
72+
}

0 commit comments

Comments
 (0)