1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00

Correction on functionality

This commit is contained in:
Ivan Chaplygin 2025-02-04 11:17:24 +03:00
parent 94fd5f07c6
commit 5fcdb944eb
2 changed files with 4 additions and 6 deletions

View file

@ -78,9 +78,9 @@ class WC_Retailcrm_Request
'woo_version' => WC()->version ?? '',
'php_version' => function_exists('phpversion') ? phpversion() : '',
'module_version' => WC_Integration_Retailcrm::MODULE_VERSION,
'ga_option_active' => getOption('ua') === WC_Retailcrm_Abstracts_Settings::YES,
'ga_option_is_active' => getOptionByCode('ua') === WC_Retailcrm_Abstracts_Settings::YES,
])
: $parameters = array_merge($this->defaultParameters, $parameters);
: array_merge($this->defaultParameters, $parameters);
$url = $this->url . $path;

View file

@ -208,9 +208,7 @@ function isCorporateOrder($wcCustomer, $wcOrder)
return !empty($wcCustomer->get_billing_company()) || !empty($wcOrder->get_billing_company());
}
function getOption($optionName)
function getOptionByCode($optionName)
{
$options = get_option(WC_Retailcrm_Base::$option_key);
return $options[$optionName] ?? null;
return get_option(WC_Retailcrm_Base::$option_key)[$optionName] ?? null;
}