return;
}
Civi::$statics[__FUNCTION__] = 1;
- Civi::dispatcher()->addListener('hook_civicrm_pageRun', 'CRM_Event_Cart_PageCallback::run');
+ // Since as a hidden extension it's always enabled, until this is a "real" extension you can turn off we need to check the legacy setting.
+ if ((bool) Civi::settings()->get('enable_cart')) {
+ Civi::dispatcher()->addListener('hook_civicrm_pageRun', 'CRM_Event_Cart_PageCallback::run');
+ }
_eventcart_civix_civicrm_config($config);
}