X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=ext%2Feventcart%2Feventcart.php;h=9fac71ca9847e27b6fb7c668f2a725c48b602047;hb=eb7549fd9cdb7b08d9a4c300c201ebef2557c9e7;hp=2199bcd32acd8510ab4f85ae99985f637e048dcb;hpb=4e7bc0ab24e2906470019bf4fab0f1be94e4e086;p=civicrm-core.git diff --git a/ext/eventcart/eventcart.php b/ext/eventcart/eventcart.php index 2199bcd32a..9fac71ca98 100644 --- a/ext/eventcart/eventcart.php +++ b/ext/eventcart/eventcart.php @@ -15,7 +15,10 @@ function eventcart_civicrm_config(&$config) { 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); }