Add backend error checking for average spent filter

MAILPOET-4987
This commit is contained in:
John Oleksowicz
2023-05-01 11:27:56 -05:00
committed by Veljko V
parent d8e29e9edb
commit 9e5b5d5ebe
3 changed files with 9 additions and 0 deletions

View File

@ -149,6 +149,7 @@ class DynamicSegments extends APIEndpoint {
return __('Please select a type for the comparison, a number of orders and a number of days.', 'mailpoet');
case InvalidFilterException::MISSING_TOTAL_SPENT_FIELDS:
case InvalidFilterException::MISSING_SINGLE_ORDER_VALUE_FIELDS:
case InvalidFilterException::MISSING_AVERAGE_SPENT_FIELDS:
return __('Please select a type for the comparison, an amount and a number of days.', 'mailpoet');
case InvalidFilterException::MISSING_FILTER:
return __('Please add at least one condition for filtering.', 'mailpoet');