Deny deleting WooCommerce subscribers

[MAILPOET-3138]
This commit is contained in:
Jan Lysý
2020-10-15 15:31:40 +02:00
committed by Veljko V
parent b8d66c8cd8
commit da15182979
2 changed files with 5 additions and 4 deletions

View File

@ -116,6 +116,7 @@ class SubscribersRepository extends Repository {
$count = $queryBuilder->delete(SubscriberEntity::class, 's')
->where('s.id IN (:ids)')
->andWhere('s.wpUserId IS NULL')
->andWhere('s.isWoocommerceUser = false')
->setParameter('ids', $ids)
->getQuery()->execute();
});