PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.13
ووسلام – همگام سازی ووکامرس و باسلام v1.10.13
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 / includes / Queue / QueueAbstract.php

QueueAbstract.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.13, at includes/Queue/QueueAbstract.php

30 lines 626 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace SyncBasalam\Queue;
4
5 defined('ABSPATH') || exit;
6 abstract class QueueAbstract
7 {
8 protected $queueManager;
9 public $NEED_SCHEDULE = false;
10
11 public function __construct()
12 {
13 $this->queueManager = new QueueManager($this->getHookName());
14 }
15
16 public function registerHooks()
17 {
18 add_action($this->getHookName(), [$this, 'handle'], 10, 1);
19 }
20
21 protected function getLastRunTimestamp()
22 {
23 return intval(get_option($this->getHookName() . '_last_run', time()));
24 }
25
26 abstract public function handle($args);
27
28 abstract protected function getHookName();
29 }
30