Bitrix\Main\Loader::registerAutoLoadClasses(null, [ 'Lib\Restrictions\OnOrderProductsInBasket' => Bitrix\Main\Application::getDocumentRoot() . '/local/Lib/Restrictions/OnOrderProductsInBasket.php', ]); $eventManager = Bitrix\Main\EventManager::getInstance(); $eventManager->addEventHandler( 'sale', 'onSalePaySystemRestrictionsClassNamesBuildList', 'customPaySystemRestrictionAdd' ); function customPaySystemRestrictionAdd(){ return new Bitrix\Main\EventResult( Bitrix\Main\EventResult::SUCCESS, [ 'Lib\Restrictions\OnOrderProductsInBasket' => '/local/Lib/Restrictions/OnOrderProductsInBasket.php', ] ); }