Update CustomFields.php
This commit is contained in:
parent
9aab02c189
commit
3dd663e7a6
@ -77,7 +77,7 @@ trait CustomFields
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
|
||||
if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Parameter `entity` must contain a data & value must be `order` or `customer`'
|
||||
);
|
||||
@ -106,7 +106,7 @@ trait CustomFields
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
|
||||
if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Parameter `entity` must contain a data & value must be `order` or `customer`'
|
||||
);
|
||||
@ -135,7 +135,7 @@ trait CustomFields
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($entity) || $entity != 'customer' || $entity != 'order') {
|
||||
if (empty($entity) || !in_array($entity, ['customer', 'order'])) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Parameter `entity` must contain a data & value must be `order` or `customer`'
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user