/** * Load the SI application * (function called at the bottom of this page) * * @package EDD_Segment * @return void */ function edd_segment_load() { if (class_exists('EDD_Segment')) { edd_segment_deactivate_plugin(); return; // already loaded, or a name collision } do_action('edd_segment_preload'); ////////// // Load // ////////// // Master class require_once EDD_SEGMENT_PATH . '/Segment.php'; // controllers require_once EDD_SEGMENT_PATH . '/controllers/_Controller.php'; EDD_Segment_Controller::init(); if (!class_exists('SA_Settings_API')) { require_once EDD_SEGMENT_PATH . '/controllers/_Settings.php'; SA_Settings_API::init(); } require_once EDD_SEGMENT_PATH . '/controllers/Settings.php'; EDD_Segment_Settings::init(); require_once EDD_SEGMENT_PATH . '/controllers/Identity.php'; EDD_Segment_Identity::init(); require_once EDD_SEGMENT_PATH . '/controllers/integrations/Segment_API.php'; EDD_Segment_Tracker::init(); require_once EDD_SEGMENT_PATH . '/controllers/integrations/CustomerIO_API.php'; EDD_CustomerIO_Tracker::init(); if (file_exists(EDD_SEGMENT_PATH . '/controllers/add-ons/AJAX_Callbacks.php')) { require_once EDD_SEGMENT_PATH . '/controllers/add-ons/AJAX_Callbacks.php'; EDD_Segment_AJAX_Callbacks::init(); } if (file_exists(EDD_SEGMENT_PATH . '/controllers/add-ons/Freemius_Webhook.php')) { require_once EDD_SEGMENT_PATH . '/controllers/add-ons/Freemius_Webhook.php'; EDD_Segment_Freemius_Webhook::init(); } require_once EDD_SEGMENT_PATH . '/controllers/add-ons/EDD_Hooks.php'; EDD_Segment_Hooks::init(); require_once EDD_SEGMENT_PATH . '/controllers/Updates.php'; EDD_Segment_Updates::init(); require_once EDD_SEGMENT_PATH . '/template-tags/edd-segment.php'; do_action('edd_segment_loaded'); }