diff --git a/retailcrm/lib/RetailcrmTools.php b/retailcrm/lib/RetailcrmTools.php index 76b06a6..507a9a7 100644 --- a/retailcrm/lib/RetailcrmTools.php +++ b/retailcrm/lib/RetailcrmTools.php @@ -455,7 +455,9 @@ class RetailcrmTools */ public static function isDebug() { - return '1' === Configuration::get(RetailCRM::ENABLE_DEBUG_MODE); + $value = Configuration::get(RetailCRM::ENABLE_DEBUG_MODE); + + return '1' === $value || true === $value; } /** @@ -489,6 +491,11 @@ class RetailcrmTools return null; } + /** + * WebJobs should be enabled by default, so here we check if it was explicitly disabled + * + * @return bool + */ public static function isWebJobsEnabled() { return '0' !== Configuration::get(RetailCRM::ENABLE_WEB_JOBS); diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index 9579744..9cc7c36 100644 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -971,7 +971,7 @@ class RetailCRM extends Module 'enableOrderNumberSending' => (false !== Tools::getValue(static::ENABLE_ORDER_NUMBER_SENDING)), 'enableOrderNumberReceiving' => (false !== Tools::getValue(static::ENABLE_ORDER_NUMBER_RECEIVING)), 'debugMode' => (false !== Tools::getValue(static::ENABLE_DEBUG_MODE)), - 'webJobs' => (false !== Tools::getValue(static::ENABLE_WEB_JOBS, true) ? '1' : '0'), + 'webJobs' => (false !== Tools::getValue(static::ENABLE_WEB_JOBS) ? '1' : '0'), 'collectorActive' => (false !== Tools::getValue(static::COLLECTOR_ACTIVE)), 'collectorKey' => (string) (Tools::getValue(static::COLLECTOR_KEY)), 'clientId' => Configuration::get(static::CLIENT_ID),