Andrei | fix bitrix CRM functions in ae site

pull/36/head
Антон 1 month ago
parent 269d8e2e67
commit 361b806265
  1. 8
      wp-content/themes/cosmopet/modules/forms/module-ajax-controller.php
  2. 7
      wp-content/themes/cosmopet/modules/forms/module-controller.php

@ -354,9 +354,11 @@ function notify_order_paid($order_id) {
$handler = FormHandlerFactory::getHandler(['tg']); $handler = FormHandlerFactory::getHandler(['tg']);
$handler->handle($formData, []); $handler->handle($formData, []);
global $site_env;
$b24Handler = new b24Handler(); if ($site_env->site_revion == 'ru'){
$b24Handler->b24_update_deal_stage_by_order_id($order_id); $b24Handler = new b24Handler();
$b24Handler->b24_update_deal_stage_by_order_id($order_id);
}
} }
?> ?>

@ -554,9 +554,10 @@ class FormHandlerFactory {
} }
} }
global $site_env;
if ($site_env->site_revion == 'ru'){
// обработка обновления профиля пользователя // обработка обновления профиля пользователя
add_action('profile_update', 'handle_profile_update', 10, 2); add_action('profile_update', 'handle_profile_update', 10, 2);
function handle_profile_update($userID, $old_user_data) { function handle_profile_update($userID, $old_user_data) {
$user = get_user_by('ID', $userID); $user = get_user_by('ID', $userID);
@ -579,7 +580,7 @@ add_action('profile_update', 'handle_profile_update', 10, 2);
error_log('Ошибка обновления контакта в Bitrix24: ' . $result['error']); error_log('Ошибка обновления контакта в Bitrix24: ' . $result['error']);
} }
} }
}
function get_utm_data() { function get_utm_data() {
$utm_data = []; $utm_data = [];

Loading…
Cancel
Save