parent
d0dfc39da0
commit
548d466bd0
@ -274,9 +274,12 @@ class WC_Retailcrm_Client_V5
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
|
||||
if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Parameter `entity` must contain a data & value must be `order` or `customer`'
|
||||
sprintf(
|
||||
'Parameter `entity` must contain a data & value must be %s',
|
||||
'`order`, `customer`, `customer_corporate` or `company`'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user