1
0
Fork 0
mirror of synced 2025-04-03 13:53:32 +03:00

add/remove events in update

This commit is contained in:
anton 2024-10-23 12:04:52 +03:00
parent 85492e39bd
commit 95dbf4120d

View file

@ -1142,12 +1142,7 @@ class UpdateSubscribe
RegisterModuleDependences('main', 'OnAfterUserRegister', 'intaro.retailcrm', 'RetailCrmEvent', 'OnAfterUserRegister');
RegisterModuleDependences('main', 'OnAfterUserAdd', 'intaro.retailcrm', 'RetailCrmEvent', 'OnAfterUserAdd');
RegisterModuleDependences('sale', 'OnSaleOrderSaved', 'intaro.retailcrm', 'RetailCrmEvent', 'orderSave', 99);
if (Option::get('intaro.retailcrm', 'loyalty_program_toggle') !== 'Y') {
$loyalty = new LoyaltyInstaller();
$loyalty->deleteLPEvents();
}
return $this;
}
@ -1187,6 +1182,12 @@ function update()
Loader::includeModule('highloadblock');
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v5');
RegisterModuleDependences('sale', 'OnSaleOrderSaved', 'intaro.retailcrm', 'RetailCrmEvent', 'orderSave', 99);
if (Option::get('intaro.retailcrm', 'loyalty_program_toggle') !== 'Y') {
$loyalty = new LoyaltyInstaller();
$loyalty->deleteLPEvents();
}
}
function createCustomPropertyFile()