From ef90fd7d8b74405d4f54743758ecfcbb8662dde0 Mon Sep 17 00:00:00 2001 From: Davod Saraei Date: Tue, 5 Jul 2022 14:44:18 +0430 Subject: [PATCH] Update Action.php make it compatible with the cartflow plugin --- classes/Action.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Action.php b/classes/Action.php index 547afd7..a473eae 100644 --- a/classes/Action.php +++ b/classes/Action.php @@ -139,7 +139,7 @@ public function createInlineScript() public function trackOrders($order_id) { - $order_id = apply_filters('woocommerce_thankyou_order_id', absint($GLOBALS['order-received'])); + $order_id = apply_filters('woocommerce_thankyou_order_id', absint($order_id)); $order_key = apply_filters('woocommerce_thankyou_order_key', empty($_GET['key']) ? '' : wc_clean($_GET['key'])); $woocommerce = new AffiliWCTracker_Woocommerce; $order = wc_get_order($order_id); @@ -238,4 +238,4 @@ protected function addFlashNotice($notice = '', $type = 'success', $dismissible // We update the option with our notices array update_option($this->plugin_name.'_flash_notices', $notices ); } -} \ No newline at end of file +}