1
0
mirror of synced 2025-03-21 23:53:59 +03:00

Closes #119 - prevent search with empty email (#130)

This commit is contained in:
Pavel 2020-05-27 16:21:50 +03:00 committed by GitHub
parent 548d466bd0
commit 1efac9612d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,6 +175,10 @@ if (!class_exists('WC_Retailcrm_Customers')) :
if (isset($filter['externalId'])) { if (isset($filter['externalId'])) {
$search = $this->retailcrm->customersGet($filter['externalId']); $search = $this->retailcrm->customersGet($filter['externalId']);
} elseif (isset($filter['email'])) { } elseif (isset($filter['email'])) {
if (empty($filter['email']) && count($filter) == 1) {
return false;
}
$search = $this->retailcrm->customersList(array('email' => $filter['email'])); $search = $this->retailcrm->customersList(array('email' => $filter['email']));
} }