| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | use SyncBasalam\Infrastructure\Container\AppServiceProvider; |
| 8 | 8 | use SyncBasalam\Infrastructure\Container\Container; |
| 9 | 9 | use SyncBasalam\Services\ForceUpdateGate; |
| 10 | 10 | use SyncBasalam\Services\VendorSyncPolicy; |
| 11 | +use SyncBasalam\Services\ScheduledProductSync; | |
| 11 | 12 | |
| 12 | 13 | defined('ABSPATH') || exit; |
| 13 | 14 | |
| 14 | 15 | /** |
| @@ -13,9 +14,9 @@ | ||
| 13 | 14 | |
| 14 | 15 | /** |
| 15 | 16 | * Plugin Name: sync basalam | ووسلام |
| 16 | 17 | * Description: با استفاده از پلاگین ووسلام میتوایند تمامی محصولات ووکامرس را با یک کلیک به غرفه باسلامی خود اضافه کنید، همچنین تمامی سفارش باسلامی شما به سایت شما اضافه میگردد. |
| 17 | - * Version: 1.10.21 | |
| 18 | + * Version: 1.10.22 | |
| 18 | 19 | * Author: Woosalam Dev |
| 19 | 20 | * Author URI: https://hamsalam.ir/wp |
| 20 | 21 | * Plugin URI: https://hamsalam.ir/wp |
| 21 | 22 | * Text Domain: sync-basalam |
| @@ -81,8 +82,9 @@ | ||
| 81 | 82 | function syncBasalamActivatePlugin() |
| 82 | 83 | { |
| 83 | 84 | Activator::activate(); |
| 84 | 85 | syncBasalamContainer()->get(VendorSyncPolicy::class)->ensureScheduled(); |
| 86 | + (new ScheduledProductSync())->ensureScheduled(); | |
| 85 | 87 | set_transient('sync_basalam_just_activated', true, 10); |
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | function syncBasalamDeactivatePlugin() |
| @@ -87,8 +89,10 @@ | ||
| 87 | 89 | |
| 88 | 90 | function syncBasalamDeactivatePlugin() |
| 89 | 91 | { |
| 90 | 92 | VendorSyncPolicy::unschedule(); |
| 93 | + ScheduledProductSync::unschedule(); | |
| 91 | 94 | } |
| 92 | 95 | |
| 93 | 96 | syncBasalamContainer()->get(JobsRunner::class); |
| 94 | 97 | syncBasalamContainer()->get(VendorSyncPolicy::class)->registerHooks(); |
| 98 | +(new ScheduledProductSync())->registerHooks(); | |