PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.2
ووسلام – همگام سازی ووکامرس و باسلام v1.10.2
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 1.7.6 All 50 releases
sync-basalam / sync-basalam.php

sync-basalam.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.2, at sync-basalam.php

93 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use SyncBasalam\Plugin;
4 use SyncBasalam\Admin\Settings\SettingsContainer;
5 use SyncBasalam\Activator;
6 use SyncBasalam\JobsRunner;
7 use SyncBasalam\Infrastructure\Container\AppServiceProvider;
8 use SyncBasalam\Infrastructure\Container\Container;
9
10 defined('ABSPATH') || exit;
11
12 /**
13 * Plugin Name: sync basalam | ووسلا�
14
15 * Description: با استفاده از پلاگین ووسلا�
16
17 یتوایند ت�
18 ا�
19 ی �
20 حصولات ووکا�
21 رس را با یک کلیک به غرفه باسلا�
22 ی خود اضافه کنید‌، ه�
23 چنین ت�
24 ا�
25 ی سفارش باسلا�
26 ی ش�
27 ا به سایت ش�
28 ا اضافه �
29 یگردد.
30 * Version: 1.10.2
31 * Author: Woosalam Dev
32 * Author URI: https://wp.hamsalam.ir/
33 * Plugin URI: https://wp.hamsalam.ir
34 * Text Domain: sync-basalam
35 * WC requires at least: 10.0.0
36 * WC tested up to: 9.9.5
37 * Requires Plugins: woocommerce
38 * License: GPL-2.0-or-later
39 * License URI: https://www.gnu.org/licenses/gpl-2.0.html.
40 */
41
42 require_once __DIR__ . '/vendor/autoload.php';
43
44 register_activation_hook(__FILE__, 'syncBasalamActivatePlugin');
45
46 add_action('before_woocommerce_init', function () {
47 if (class_exists(\Automattic\WooCommerce\Utilities\FeaturesUtil::class)) {
48 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true);
49 }
50 });
51
52 if (get_option('sync_basalam_force_update')) {
53 add_action('admin_notices', function () {
54 $template = __DIR__ . '/templates/notifications/ForceUpdateAlert.php';
55 require_once $template;
56 });
57 return;
58 }
59
60 add_action('init', 'syncBasalamPlugin');
61
62 function syncBasalamContainer()
63 {
64 static $container = null;
65
66 if ($container === null) {
67 $container = new Container();
68 $container->provider(new AppServiceProvider());
69 }
70
71 return $container;
72 }
73
74 // Singleton instance of the main plugin class.
75 function syncBasalamPlugin()
76 {
77 return syncBasalamContainer()->get(Plugin::class);
78 }
79
80 // Singleton instance of the woosalam Settings container.
81 function syncBasalamSettings()
82 {
83 return syncBasalamContainer()->get(SettingsContainer::class);
84 }
85
86 function syncBasalamActivatePlugin()
87 {
88 Activator::activate();
89 set_transient('sync_basalam_just_activated', true, 10);
90 }
91
92 syncBasalamContainer()->get(JobsRunner::class);
93