<?php
   function unipixel_get_common_woo_data_checkout() { if (!class_exists("\x57\x6F\x6F\x43\x6F\x6D\x6D\x65\x72\x63\x65")) { return null; }  if (! WC()->cart || WC()->cart->is_empty()) { return null; }  $plcehldr_event_id = 'init_checkout_' . microtime(true);  $plcehldr_currency = get_woocommerce_currency(); $plcehldr_value = (float) WC()->cart->get_total("\x65\x64\x69\x74");   $plcehldr_tax = (float) WC()->cart->get_cart_contents_tax(); $plcehldr_shipping = (float) WC()->cart->get_shipping_total();  $plcehldr_lineItems = []; foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) { if (! isset($cart_item["\x64\x61\x74\x61"])) { continue; } $product = $cart_item["\x64\x61\x74\x61"]; $quantity = (int) $cart_item["\x71\x75\x61\x6E\x74\x69\x74\x79"]; $price = (float) $product->get_price(); $variant = unipixel_get_product_variant($product); $arrCategories = unipixel_get_product_categories($product); $plcehldr_lineItems[] = [ 'plcehldr_itemId' => $product->get_id(), 'plcehldr_itemName' => sanitize_text_field($product->get_name()), 'plcehldr_variant' => (string) $variant, 'plcehldr_categories' => $arrCategories, 'plcehldr_quantity' => $quantity, 'plcehldr_price' => $price, ]; }  $plcehldr_clientIp = sanitize_text_field(unipixel_get_ip_address() ?? ""); $plcehldr_userAgent = sanitize_text_field($_SERVER["\x48\x54\x54\x50\x5F\x55\x53\x45\x52\x5F\x41\x47\x45\x4E\x54"] ?? ""); $plcehldr_fbpCookie = sanitize_text_field($_COOKIE["\x5F\x66\x62\x70"] ?? "");  $amData = unipixel_get_advanced_matching_data(); return array_merge($amData, [ 'plcehldr_eventId' => $plcehldr_event_id, 'plcehldr_currency' => $plcehldr_currency, 'plcehldr_value' => $plcehldr_value, 'plcehldr_tax' => $plcehldr_tax, 'plcehldr_shipping' => $plcehldr_shipping, 'plcehldr_lineItems' => $plcehldr_lineItems, 'plcehldr_clientIp' => $plcehldr_clientIp, 'plcehldr_userAgent' => $plcehldr_userAgent, 'plcehldr_fbpCookie' => $plcehldr_fbpCookie, ]); } 