PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.18
ووسلام – همگام سازی ووکامرس و باسلام v1.10.18
1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 1.8.7 1.8.4 All 51 releases
sync-basalam / includes / Actions / Controller / RefreshVendorStatus.php

RefreshVendorStatus.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.18, at includes/Actions/Controller/RefreshVendorStatus.php

36 lines 870 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SyncBasalam\Actions\Controller;
4
5 use SyncBasalam\Services\VendorSyncPolicy;
6
7 defined('ABSPATH') || exit;
8
9 class RefreshVendorStatus extends ActionController
10 {
11 public function __invoke()
12 {
13 $vendorSyncPolicy = syncBasalamContainer()->get(VendorSyncPolicy::class);
14 $vendorSyncPolicy->refresh();
15 $state = $vendorSyncPolicy->getFrontendState(false);
16
17 if ($state['mode'] === VendorSyncPolicy::MODE_ACTIVE) {
18 wp_send_json_success([
19 'message' => 'غرفه ش�
20 ا فعال است و �
21 حدودیت‌های ه�
22 گا�
23 ‌سازی برداشته شد.',
24 'state' => $state,
25 ]);
26 }
27
28 wp_send_json_success([
29 'message' => 'غرفه ش�
30 ا هنوز در باسلا�
31 غیرفعال است.',
32 'state' => $state,
33 ]);
34 }
35 }
36