Change error message when request is almost empty

[MAILPOET-3469]
This commit is contained in:
Jan Lysý
2021-06-09 10:12:28 +02:00
committed by Veljko V
parent 72a3bfa35e
commit 97dd402d21
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types = 1);
namespace MailPoet\API\JSON\v1;
@ -143,6 +143,8 @@ class DynamicSegments extends APIEndpoint {
return WPFunctions::get()->__('Please select a type for the comparison, a number of orders and a number of days.', 'mailpoet');
case InvalidFilterException::MISSING_TOTAL_SPENT_FIELDS:
return WPFunctions::get()->__('Please select a type for the comparison, an amount and a number of days.', 'mailpoet');
case InvalidFilterException::MISSING_FILTER:
return WPFunctions::get()->__('Please add at least one condition for filtering.', 'mailpoet');
default:
return WPFunctions::get()->__('An error occurred while saving data.', 'mailpoet');
}