From 90e058baeb6883f50d9bdabc7c5c9421a5961981 Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 20 Jun 2020 23:55:13 +0000 Subject: [PATCH] monero-gateway: fix AJAX status updates - use get_customer_id() --- include/class-monero-gateway.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class-monero-gateway.php b/include/class-monero-gateway.php index 6d0f68d..2187d4a 100644 --- a/include/class-monero-gateway.php +++ b/include/class-monero-gateway.php @@ -595,7 +595,7 @@ class Monero_Gateway extends WC_Payment_Gateway $order_id = preg_replace("/[^0-9]+/", "", $_GET['order_id']); $order = wc_get_order( $order_id ); - if($order->user_id() != $user->ID) + if($order->get_customer_id() != $user->ID) self::ajax_output(array('error' => '[ERROR] Order does not belong to this user')); if($order->get_payment_method() != self::$_id)