<?php
   function unipixel_get_common_woo_data_viewcontent($product_id) { if (!class_exists("\x57\x6F\x6F\x43\x6F\x6D\x6D\x65\x72\x63\x65")) { return null; } $product = wc_get_product($product_id); if (!$product) { return null; }  $plcehldr_event_id = 'view_content_' . microtime(true); $plcehldr_price = (float) $product->get_price(); $plcehldr_currency = get_woocommerce_currency(); $itemName = sanitize_text_field($product->get_name()); $variant = unipixel_get_product_variant($product); $arrCategories = unipixel_get_product_categories($product);  $amData = unipixel_get_advanced_matching_data(); $genericData = array_merge($amData, [ 'plcehldr_eventId' => $plcehldr_event_id, 'plcehldr_productId' => (string) $product_id, 'plcehldr_itemName' => (string) $itemName, 'plcehldr_variant' => (string) $variant, 'plcehldr_categories' => $arrCategories, 'plcehldr_price' => $plcehldr_price, 'plcehldr_currency' => $plcehldr_currency, '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"] ?? ""), ]); return $genericData; } 