From 516b2addb6cece2d3077dcfeb88542b3ecd4c668 Mon Sep 17 00:00:00 2001 From: Karl Breuer Date: Wed, 16 Apr 2025 16:56:10 +0200 Subject: [PATCH] fixed second req --- .../includes/class-tracking.php | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/wordpress/palantics-tracking-plugin/includes/class-tracking.php b/wordpress/palantics-tracking-plugin/includes/class-tracking.php index 5ca13fa..034ecf8 100644 --- a/wordpress/palantics-tracking-plugin/includes/class-tracking.php +++ b/wordpress/palantics-tracking-plugin/includes/class-tracking.php @@ -17,8 +17,8 @@ class Palantics_Tracking { * Constructor */ public function __construct() { - // Add the script to the header - add_action('wp_head', array($this, 'add_tracking_script'), 10); + // Remove the duplicate event listener + // add_action('wp_head', array($this, 'add_tracking_script'), 10); // REMOVED // Register REST API endpoint add_action('rest_api_init', array($this, 'register_rest_endpoint')); @@ -34,26 +34,11 @@ class Palantics_Tracking { } /** - * Add tracking script to header + * Add tracking script to header - KEPT FOR BACKWARD COMPATIBILITY BUT NOT USED */ public function add_tracking_script() { - // This is now handled by the Loader class using wp_enqueue_scripts - - // Fallback for backward compatibility - will call pL() function - ?> - - -