diff --git a/conversion-tracking.php b/conversion-tracking.php index 44953b4..a90739b 100644 --- a/conversion-tracking.php +++ b/conversion-tracking.php @@ -77,7 +77,6 @@ public function __construct() { $this->define_constants(); $this->init_hooks(); $this->includes(); - $this->init_classes(); register_activation_hook( __FILE__, array( $this, 'activate' ) ); @@ -186,12 +185,11 @@ public function init_hooks() { add_action( 'plugins_loaded', array( $this, 'plugin_upgrades' ) ); add_action( 'init', array( $this, 'localization_setup' ) ); + add_action( 'init', array( $this, 'init_classes' ) ); add_action( 'admin_notices', array( $this, 'check_woocommerce_exist' ) ); add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'plugin_action_links' ) ); add_action( 'admin_notices', array( $this, 'happy_addons_ads_banner' ) ); - - $this->init_tracker(); } /** @@ -200,6 +198,7 @@ public function init_hooks() { * @return void */ public function init_classes() { + $this->init_tracker(); $this->container['ajax'] = new WCCT_Ajax(); $this->container['event_dispatcher'] = new WCCT_Event_Dispatcher(); $this->container['admin'] = new WCCT_Admin();