From 1941a2d70f9261b220066246047517ac8a137cf5 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 24 Jul 2024 08:49:52 +0300 Subject: [PATCH] Added some cookies for the webhook --- ...class-gtm-server-side-webhook-purchase.php | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/includes/class-gtm-server-side-webhook-purchase.php b/includes/class-gtm-server-side-webhook-purchase.php index 4dce30c..919fab0 100644 --- a/includes/class-gtm-server-side-webhook-purchase.php +++ b/includes/class-gtm-server-side-webhook-purchase.php @@ -65,14 +65,25 @@ public function woocommerce_new_order( $order_id, $order ) { $request['user_data']['new_customer'] = GTM_Server_Side_WC_Helpers::instance()->is_new_customer( $order->get_customer_id() ) ? 'true' : 'false'; $request_cookies = array( - '_fbp' => filter_input( INPUT_COOKIE, '_fbp', FILTER_DEFAULT ), - '_fbc' => filter_input( INPUT_COOKIE, '_fbc', FILTER_DEFAULT ), - 'FPGCLAW' => filter_input( INPUT_COOKIE, 'FPGCLAW', FILTER_DEFAULT ), - '_gcl_aw' => filter_input( INPUT_COOKIE, '_gcl_aw', FILTER_DEFAULT ), - 'ttclid' => filter_input( INPUT_COOKIE, 'ttclid', FILTER_DEFAULT ), - '_dcid' => filter_input( INPUT_COOKIE, '_dcid', FILTER_DEFAULT ), - 'FPID' => filter_input( INPUT_COOKIE, 'FPID', FILTER_DEFAULT ), - 'FPLC' => filter_input( INPUT_COOKIE, 'FPLC', FILTER_DEFAULT ), + '_fbp' => filter_input( INPUT_COOKIE, '_fbp', FILTER_DEFAULT ), + '_fbc' => filter_input( INPUT_COOKIE, '_fbc', FILTER_DEFAULT ), + 'FPGCLAW' => filter_input( INPUT_COOKIE, 'FPGCLAW', FILTER_DEFAULT ), + '_gcl_aw' => filter_input( INPUT_COOKIE, '_gcl_aw', FILTER_DEFAULT ), + 'ttclid' => filter_input( INPUT_COOKIE, 'ttclid', FILTER_DEFAULT ), + '_dcid' => filter_input( INPUT_COOKIE, '_dcid', FILTER_DEFAULT ), + 'FPID' => filter_input( INPUT_COOKIE, 'FPID', FILTER_DEFAULT ), + 'FPLC' => filter_input( INPUT_COOKIE, 'FPLC', FILTER_DEFAULT ), + '_ttp' => filter_input( INPUT_COOKIE, '_ttp', FILTER_DEFAULT ), + 'FPGCLGB' => filter_input( INPUT_COOKIE, 'FPGCLGB', FILTER_DEFAULT ), + 'li_fat_id' => filter_input( INPUT_COOKIE, 'li_fat_id', FILTER_DEFAULT ), + 'taboola_cid' => filter_input( INPUT_COOKIE, 'taboola_cid', FILTER_DEFAULT ), + 'outbrain_cid' => filter_input( INPUT_COOKIE, 'outbrain_cid', FILTER_DEFAULT ), + 'impact_cid' => filter_input( INPUT_COOKIE, 'impact_cid', FILTER_DEFAULT ), + '_epik' => filter_input( INPUT_COOKIE, '_epik', FILTER_DEFAULT ), + '_scid' => filter_input( INPUT_COOKIE, '_scid', FILTER_DEFAULT ), + '_scclid' => filter_input( INPUT_COOKIE, '_scclid', FILTER_DEFAULT ), + '_uetmsclkid' => filter_input( INPUT_COOKIE, '_uetmsclkid', FILTER_DEFAULT ), + '_ga' => filter_input( INPUT_COOKIE, '_ga', FILTER_DEFAULT ), ); if ( ! empty( $_COOKIE ) ) {