We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5bd666c + fb00b19 commit 75e87cbCopy full SHA for 75e87cb
1 file changed
src/Validator/CheckoutValidator.php
@@ -10,6 +10,7 @@
10
namespace Cdek\Validator {
11
12
use Cdek\CdekApi;
13
+ use Cdek\Config;
14
use Cdek\Exceptions\CacheException;
15
use Cdek\Exceptions\External\ApiException;
16
use Cdek\Exceptions\External\CoreAuthException;
@@ -32,7 +33,7 @@ public function __invoke(): void
32
33
$meta = $rate->get_meta_data();
34
35
if ( in_array((int)$meta[MetaKeys::TARIFF_MODE], Tariff::listOfficeDeliveryModes(), true) ) {
- if ( empty($meta[MetaKeys::OFFICE_CODE]) ) {
36
+ if ( empty($meta[MetaKeys::OFFICE_CODE]) && empty($request['extensions'][Config::DELIVERY_NAME]['office_code']) ) {
37
wc_add_notice(esc_html__('Order pickup point not selected.', 'cdekdelivery'), 'error');
38
}
39
} else {
0 commit comments