PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.29
ووسلام – همگام سازی ووکامرس و باسلام v1.10.29
1.10.29 1.10.28 1.1.26 1.10.27 1.10.24 1.10.25 1.10.23 1.10.22 1.10.21 1.10.19 1.10.20 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 All 62 releases
← All changes | tests/Support/JobsRunnerWordPressStubs.php +32 -0 1.10.24 → 1.10.29 View file →
@@ -66,8 +66,37 @@
66 66 return $GLOBALS['sync_basalam_jobs_runner_test_state']['transients'][$transient] ?? false;
67 67 }
68 68 }
69 69
70 +if (!function_exists('get_option')) {
71 + function get_option($name, $default = false)
72 + {
73 + return $GLOBALS['sync_basalam_test_options'][$name] ?? $default;
74 + }
75 +}
76 +
77 +if (!function_exists('update_option')) {
78 + function update_option($name, $value, $autoload = null)
79 + {
80 + $GLOBALS['sync_basalam_test_options'][$name] = $value;
81 + return true;
82 + }
83 +}
84 +
85 +if (!function_exists('wp_using_ext_object_cache')) {
86 + function wp_using_ext_object_cache()
87 + {
88 + return $GLOBALS['sync_basalam_jobs_runner_test_state']['external_object_cache'] ?? false;
89 + }
90 +}
91 +
92 +if (!function_exists('wp_installing')) {
93 + function wp_installing()
94 + {
95 + return false;
96 + }
97 +}
98 +
70 99 if (!function_exists('set_transient')) {
71 100 function set_transient($transient, $value, $expiration = 0)
72 101 {
73 102 $GLOBALS['sync_basalam_jobs_runner_test_state']['events'][] = 'set_transient';
@@ -76,8 +105,11 @@
76 105 'value' => $value,
77 106 'expiration' => $expiration,
78 107 ];
79 108 $GLOBALS['sync_basalam_jobs_runner_test_state']['transients'][$transient] = $value;
109 + if ($expiration > 0) {
110 + $GLOBALS['sync_basalam_test_options']['_transient_timeout_' . $transient] = time() + $expiration;
111 + }
80 112
81 113 return true;
82 114 }
83 115 }