Skip to content

Commit ee9d064

Browse files
authored
Update class-wc-tpayway.php
Fix Amount and ShoppingCart
1 parent 41c12ab commit ee9d064

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

classes/class-wc-tpayway.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,8 @@ function check_tcompayway_response()
493493
// exit;
494494
//}
495495

496-
if (!$_POST['Amount']) {
497-
$amount = 0;
498-
} else {
499-
$amount = $_POST['Amount'];
500-
}
501-
502-
$order_id = $_POST['ShoppingCartID'];
496+
$amount = isset($_POST['Amount']) ? $_POST['Amount'] : 0;
497+
$order_id = isset($_POST['ShoppingCartID']) ? $_POST['ShoppingCartID'] : null;
503498

504499
$order = new WC_Order($order_id);
505500
$amount = $this->sanitize($amount);

0 commit comments

Comments
 (0)