Skip to content

Commit

Permalink
Added some cookies for the webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
plance committed Jul 24, 2024
1 parent d8911ea commit 1941a2d
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions includes/class-gtm-server-side-webhook-purchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) {
Expand Down

0 comments on commit 1941a2d

Please sign in to comment.