Version Description
WooCommerce 7.0.0 compatible, WordPress 6.0.3 compatible, Readme file changes, POT file
Download this release
Release Info
Developer | storeapps |
Plugin | WooCommerce Stock Manager |
Version | 2.9.0 |
Comparing to | |
See all releases |
Code changes from version 2.8.3 to 2.9.0
- admin/class-stock-manager-admin.php +5 -60
- languages/woocommerce-stock-manager.pot +74 -150
- readme.txt +65 -56
- sa-includes/class-sa-in-app-offers.php +0 -203
- sa-includes/class-sa-wsm-in-app-offer.php +253 -0
- sa-includes/images/BFCM-2021-800-200.png +0 -0
- sa-includes/images/halloween-2022.png +0 -0
- woocommerce-stock-manager.php +56 -3
admin/class-stock-manager-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Main class for Stock Manager.
|
4 |
*
|
5 |
* @package woocommerce-stock-manager/admin/
|
6 |
-
* @version 2.8.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -44,13 +44,9 @@ class Stock_Manager_Admin {
|
|
44 |
|
45 |
add_action( 'admin_notices', array( $this, 'includes' ) );
|
46 |
|
47 |
-
add_action( 'admin_init', array( $this, 'wsm_dismiss_admin_notice' ) );
|
48 |
-
|
49 |
// To update footer text on WSM screens.
|
50 |
add_filter( 'admin_footer_text', array( $this, 'wsm_footer_text' ), 99999 );
|
51 |
add_filter( 'update_footer', array( $this, 'wsm_update_footer_text' ), 99999 );
|
52 |
-
|
53 |
-
$this->may_be_show_sa_in_app_offer();
|
54 |
}
|
55 |
|
56 |
/**
|
@@ -72,24 +68,13 @@ class Stock_Manager_Admin {
|
|
72 |
* Include required core files used in admin.
|
73 |
*/
|
74 |
public function includes() {
|
75 |
-
$is_wsm_admin =
|
76 |
if ( $is_wsm_admin ) {
|
77 |
$this->wsm_add_subscribe_notice();
|
78 |
|
79 |
}
|
80 |
}
|
81 |
|
82 |
-
/**
|
83 |
-
* Function to check if WSM admin page.
|
84 |
-
*/
|
85 |
-
public function is_wsm_admin_page() {
|
86 |
-
if ( 'stock-manager' === $this->page || 'stock-manager-import-export' === $this->page || 'stock-manager-log' === $this->page || 'stock-manager-setting' === $this->page || 'stock-manager-storeapps-plugins' === $this->page ) {
|
87 |
-
return true;
|
88 |
-
}
|
89 |
-
|
90 |
-
return false;
|
91 |
-
}
|
92 |
-
|
93 |
/**
|
94 |
* Get stock class
|
95 |
*
|
@@ -186,7 +171,7 @@ class Stock_Manager_Admin {
|
|
186 |
// Klawoo subscribe.
|
187 |
$wsm_dismiss_admin_notice = get_option( 'wsm_dismiss_subscribe_admin_notice', false );
|
188 |
if ( empty( $wsm_dismiss_admin_notice ) ) {
|
189 |
-
$is_wsm_admin =
|
190 |
if ( $is_wsm_admin ) {
|
191 |
$params = array(
|
192 |
'ajax_nonce' => wp_create_nonce( 'wsm_update' ),
|
@@ -332,46 +317,6 @@ class Stock_Manager_Admin {
|
|
332 |
}
|
333 |
}
|
334 |
|
335 |
-
/**
|
336 |
-
* Function to show SA in app offers in WSM if any.
|
337 |
-
*
|
338 |
-
* @since: 2.5.2.
|
339 |
-
*/
|
340 |
-
public function may_be_show_sa_in_app_offer() {
|
341 |
-
if ( ! class_exists( 'SA_In_App_Offers' ) ) {
|
342 |
-
include_once STOCKDIR . 'sa-includes/class-sa-in-app-offers.php';
|
343 |
-
|
344 |
-
$is_wsm_admin = $this->is_wsm_admin_page();
|
345 |
-
|
346 |
-
$args = array(
|
347 |
-
'file' => WSM_PLUGIN_FILE,
|
348 |
-
'prefix' => 'wsm',
|
349 |
-
'option_name' => 'sa_offer_bfcm_2021_wsm',
|
350 |
-
'campaign' => 'sa_halloween_2021',
|
351 |
-
'start' => '2021-11-23 06:30:00',
|
352 |
-
'end' => '2021-12-02 06:30:00',
|
353 |
-
'is_plugin_page' => $is_wsm_admin ? true : false,
|
354 |
-
);
|
355 |
-
|
356 |
-
SA_In_App_Offers::get_instance( $args );
|
357 |
-
}
|
358 |
-
}
|
359 |
-
|
360 |
-
/**
|
361 |
-
* Function to dismiss admin notice.
|
362 |
-
*/
|
363 |
-
public function wsm_dismiss_admin_notice() {
|
364 |
-
$dismiss_wsm_notice = ( ! empty( $_GET['wsm_dismiss_admin_notice'] ) ) ? wc_clean( wp_unslash( $_GET['wsm_dismiss_admin_notice'] ) ) : ''; // phpcs:ignore
|
365 |
-
$option_name = ( ! empty( $_GET['option_name'] ) ) ? wc_clean( wp_unslash( $_GET['option_name'] ) ) : ''; // phpcs:ignore
|
366 |
-
if ( '1' === $dismiss_wsm_notice && $option_name ) {
|
367 |
-
update_option( $option_name . '_wsm', 'no', 'no' );
|
368 |
-
$referer = wp_get_referer();
|
369 |
-
wp_safe_redirect( $referer );
|
370 |
-
exit();
|
371 |
-
}
|
372 |
-
|
373 |
-
}
|
374 |
-
|
375 |
/**
|
376 |
* Function to show notice in the admin.
|
377 |
*/
|
@@ -470,7 +415,7 @@ class Stock_Manager_Admin {
|
|
470 |
*/
|
471 |
public function wsm_footer_text( $wsm_rating_text ) {
|
472 |
|
473 |
-
$is_wsm_admin =
|
474 |
if ( $is_wsm_admin ) {
|
475 |
/* translators: %1$s & %2$s: Opening & closing strong tag. %3$s: link to Stock Manager for WooCommerce on WordPress.org */
|
476 |
$wsm_rating_text = sprintf( __( 'If you are liking %1$sStock Manager for WooCommerce%2$s, please rate us %3$s. A huge thanks from StoreApps in advance!', 'woocommerce-stock-manager' ), '<strong>', '</strong>', '<a target="_blank" href="' . esc_url( 'https://wordpress.org/support/plugin/woocommerce-stock-manager/reviews/?filter=5' ) . '" style="color: #5850EC;">5-star</a>' );
|
@@ -488,7 +433,7 @@ class Stock_Manager_Admin {
|
|
488 |
*/
|
489 |
public function wsm_update_footer_text( $wsm_text ) {
|
490 |
|
491 |
-
$is_wsm_admin =
|
492 |
if ( $is_wsm_admin ) {
|
493 |
$wsm_text = 'Installed Version: ' . WSM_PLUGIN_VERSION;
|
494 |
?>
|
3 |
* Main class for Stock Manager.
|
4 |
*
|
5 |
* @package woocommerce-stock-manager/admin/
|
6 |
+
* @version 2.8.4
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) {
|
44 |
|
45 |
add_action( 'admin_notices', array( $this, 'includes' ) );
|
46 |
|
|
|
|
|
47 |
// To update footer text on WSM screens.
|
48 |
add_filter( 'admin_footer_text', array( $this, 'wsm_footer_text' ), 99999 );
|
49 |
add_filter( 'update_footer', array( $this, 'wsm_update_footer_text' ), 99999 );
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
68 |
* Include required core files used in admin.
|
69 |
*/
|
70 |
public function includes() {
|
71 |
+
$is_wsm_admin = is_wsm_admin_page();
|
72 |
if ( $is_wsm_admin ) {
|
73 |
$this->wsm_add_subscribe_notice();
|
74 |
|
75 |
}
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
/**
|
79 |
* Get stock class
|
80 |
*
|
171 |
// Klawoo subscribe.
|
172 |
$wsm_dismiss_admin_notice = get_option( 'wsm_dismiss_subscribe_admin_notice', false );
|
173 |
if ( empty( $wsm_dismiss_admin_notice ) ) {
|
174 |
+
$is_wsm_admin = is_wsm_admin_page();
|
175 |
if ( $is_wsm_admin ) {
|
176 |
$params = array(
|
177 |
'ajax_nonce' => wp_create_nonce( 'wsm_update' ),
|
317 |
}
|
318 |
}
|
319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
/**
|
321 |
* Function to show notice in the admin.
|
322 |
*/
|
415 |
*/
|
416 |
public function wsm_footer_text( $wsm_rating_text ) {
|
417 |
|
418 |
+
$is_wsm_admin = is_wsm_admin_page();
|
419 |
if ( $is_wsm_admin ) {
|
420 |
/* translators: %1$s & %2$s: Opening & closing strong tag. %3$s: link to Stock Manager for WooCommerce on WordPress.org */
|
421 |
$wsm_rating_text = sprintf( __( 'If you are liking %1$sStock Manager for WooCommerce%2$s, please rate us %3$s. A huge thanks from StoreApps in advance!', 'woocommerce-stock-manager' ), '<strong>', '</strong>', '<a target="_blank" href="' . esc_url( 'https://wordpress.org/support/plugin/woocommerce-stock-manager/reviews/?filter=5' ) . '" style="color: #5850EC;">5-star</a>' );
|
433 |
*/
|
434 |
public function wsm_update_footer_text( $wsm_text ) {
|
435 |
|
436 |
+
$is_wsm_admin = is_wsm_admin_page();
|
437 |
if ( $is_wsm_admin ) {
|
438 |
$wsm_text = 'Installed Version: ' . WSM_PLUGIN_VERSION;
|
439 |
?>
|
languages/woocommerce-stock-manager.pot
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
# Copyright (C)
|
2 |
-
# This file is distributed under the
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Stock Manager for WooCommerce 2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-stock-manager\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date:
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
-
"X-Generator: WP-CLI 2.
|
15 |
"X-Domain: woocommerce-stock-manager\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
@@ -34,6 +34,68 @@ msgstr ""
|
|
34 |
msgid "https://www.storeapps.org/"
|
35 |
msgstr ""
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
#: admin/views/import-export.php:121
|
38 |
msgid "Import"
|
39 |
msgstr ""
|
@@ -56,44 +118,31 @@ msgstr ""
|
|
56 |
|
57 |
#: admin/views/import-export.php:130
|
58 |
#: admin/views/import-export.php:153
|
59 |
-
#: admin/assets/src/components/Products.js:93
|
60 |
msgid "ID"
|
61 |
msgstr ""
|
62 |
|
63 |
#: admin/views/import-export.php:131
|
64 |
#: admin/views/import-export.php:154
|
65 |
#: admin/views/log.php:29
|
66 |
-
#: admin/assets/src/components/ProductFilter.js:64
|
67 |
-
#: admin/assets/src/components/Products.js:99
|
68 |
-
#: admin/assets/src/components/ScreenOptions.js:38
|
69 |
msgid "SKU"
|
70 |
msgstr ""
|
71 |
|
72 |
#: admin/views/import-export.php:132
|
73 |
-
#: admin/assets/src/components/Products.js:115
|
74 |
-
#: admin/assets/src/components/ScreenOptions.js:48
|
75 |
msgid "Product name"
|
76 |
msgstr ""
|
77 |
|
78 |
#: admin/views/import-export.php:133
|
79 |
#: admin/views/import-export.php:155
|
80 |
-
#: admin/assets/src/components/Products.js:139
|
81 |
-
#: admin/assets/src/components/ScreenOptions.js:68
|
82 |
msgid "Manage stock"
|
83 |
msgstr ""
|
84 |
|
85 |
#: admin/views/import-export.php:134
|
86 |
#: admin/views/import-export.php:156
|
87 |
-
#: admin/assets/src/components/ProductFilter.js:112
|
88 |
-
#: admin/assets/src/components/Products.js:142
|
89 |
-
#: admin/assets/src/components/ScreenOptions.js:73
|
90 |
msgid "Stock status"
|
91 |
msgstr ""
|
92 |
|
93 |
#: admin/views/import-export.php:135
|
94 |
#: admin/views/import-export.php:157
|
95 |
-
#: admin/assets/src/components/Products.js:145
|
96 |
-
#: admin/assets/src/components/ScreenOptions.js:78
|
97 |
msgid "Backorders"
|
98 |
msgstr ""
|
99 |
|
@@ -101,14 +150,11 @@ msgstr ""
|
|
101 |
#: admin/views/import-export.php:158
|
102 |
#: admin/views/log-history.php:49
|
103 |
#: admin/views/log.php:33
|
104 |
-
#: admin/assets/src/components/Products.js:148
|
105 |
-
#: admin/assets/src/components/ScreenOptions.js:83
|
106 |
msgid "Stock"
|
107 |
msgstr ""
|
108 |
|
109 |
#: admin/views/import-export.php:137
|
110 |
#: admin/views/log.php:31
|
111 |
-
#: admin/assets/src/components/Products.js:97
|
112 |
msgid "Product type"
|
113 |
msgstr ""
|
114 |
|
@@ -230,66 +276,17 @@ msgstr ""
|
|
230 |
msgid "Active old styles"
|
231 |
msgstr ""
|
232 |
|
233 |
-
#:
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
#: admin/class-stock-manager-admin.php:171
|
238 |
-
msgid "Taxable"
|
239 |
-
msgstr ""
|
240 |
-
|
241 |
-
#: admin/class-stock-manager-admin.php:172
|
242 |
-
msgid "Shipping only"
|
243 |
-
msgstr ""
|
244 |
-
|
245 |
-
#: admin/class-stock-manager-admin.php:173
|
246 |
-
msgctxt "Tax status"
|
247 |
-
msgid "None"
|
248 |
-
msgstr ""
|
249 |
-
|
250 |
-
#: admin/class-stock-manager-admin.php:176
|
251 |
-
msgid "No"
|
252 |
-
msgstr ""
|
253 |
-
|
254 |
-
#: admin/class-stock-manager-admin.php:177
|
255 |
-
msgid "Notify"
|
256 |
-
msgstr ""
|
257 |
-
|
258 |
-
#: admin/class-stock-manager-admin.php:178
|
259 |
-
msgid "Yes"
|
260 |
-
msgstr ""
|
261 |
-
|
262 |
-
#: admin/class-stock-manager-admin.php:238
|
263 |
-
#: admin/class-stock-manager-admin.php:239
|
264 |
-
msgid "Stock Manager"
|
265 |
-
msgstr ""
|
266 |
-
|
267 |
-
#: admin/class-stock-manager-admin.php:262
|
268 |
-
#: admin/class-stock-manager-admin.php:263
|
269 |
-
msgid "Import/Export"
|
270 |
-
msgstr ""
|
271 |
-
|
272 |
-
#: admin/class-stock-manager-admin.php:270
|
273 |
-
#: admin/class-stock-manager-admin.php:271
|
274 |
-
msgid "Stock log"
|
275 |
-
msgstr ""
|
276 |
-
|
277 |
-
#: admin/class-stock-manager-admin.php:278
|
278 |
-
msgid "Stock Manager Setting"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#:
|
282 |
-
msgid "
|
283 |
msgstr ""
|
284 |
|
285 |
-
#:
|
286 |
-
|
287 |
-
msgid "StoreApps Plugins"
|
288 |
-
msgstr ""
|
289 |
-
|
290 |
-
#. translators: %1$s & %2$s: Opening & closing strong tag. %3$s: link to Stock Manager for WooCommerce on WordPress.org
|
291 |
-
#: admin/class-stock-manager-admin.php:476
|
292 |
-
msgid "If you are liking %1$sStock Manager for WooCommerce%2$s, please rate us %3$s. A huge thanks from StoreApps in advance!"
|
293 |
msgstr ""
|
294 |
|
295 |
#: woocommerce-stock-manager.php:76
|
@@ -307,76 +304,3 @@ msgstr ""
|
|
307 |
#: woocommerce-stock-manager.php:272
|
308 |
msgid "All done! Close."
|
309 |
msgstr ""
|
310 |
-
|
311 |
-
#: admin/assets/src/components/ProductFilter.js:74
|
312 |
-
msgid "Search"
|
313 |
-
msgstr ""
|
314 |
-
|
315 |
-
#: admin/assets/src/components/ProductFilter.js:86
|
316 |
-
msgid "Category"
|
317 |
-
msgstr ""
|
318 |
-
|
319 |
-
#: admin/assets/src/components/ProductFilter.js:92
|
320 |
-
#: admin/assets/src/components/ProductFilter.js:105
|
321 |
-
#: admin/assets/src/components/ProductFilter.js:118
|
322 |
-
msgid "All"
|
323 |
-
msgstr ""
|
324 |
-
|
325 |
-
#: admin/assets/src/components/ProductFilter.js:99
|
326 |
-
msgid "Type"
|
327 |
-
msgstr ""
|
328 |
-
|
329 |
-
#: admin/assets/src/components/Products.js:53
|
330 |
-
msgid "Loading failed"
|
331 |
-
msgstr ""
|
332 |
-
|
333 |
-
#: admin/assets/src/components/Products.js:102
|
334 |
-
#: admin/assets/src/components/ScreenOptions.js:43
|
335 |
-
msgid "Thumbnail"
|
336 |
-
msgstr ""
|
337 |
-
|
338 |
-
#: admin/assets/src/components/Products.js:121
|
339 |
-
#: admin/assets/src/components/ScreenOptions.js:88
|
340 |
-
msgid "Tax status"
|
341 |
-
msgstr ""
|
342 |
-
|
343 |
-
#: admin/assets/src/components/Products.js:124
|
344 |
-
#: admin/assets/src/components/ScreenOptions.js:93
|
345 |
-
msgid "Tax class"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: admin/assets/src/components/Products.js:127
|
349 |
-
#: admin/assets/src/components/ScreenOptions.js:98
|
350 |
-
msgid "Shipping class"
|
351 |
-
msgstr ""
|
352 |
-
|
353 |
-
#: admin/assets/src/components/Products.js:130
|
354 |
-
#: admin/assets/src/components/ScreenOptions.js:53
|
355 |
-
msgid "Price"
|
356 |
-
msgstr ""
|
357 |
-
|
358 |
-
#: admin/assets/src/components/Products.js:133
|
359 |
-
#: admin/assets/src/components/ScreenOptions.js:58
|
360 |
-
msgid "Sale price"
|
361 |
-
msgstr ""
|
362 |
-
|
363 |
-
#: admin/assets/src/components/Products.js:136
|
364 |
-
#: admin/assets/src/components/ScreenOptions.js:63
|
365 |
-
msgid "Weight"
|
366 |
-
msgstr ""
|
367 |
-
|
368 |
-
#: admin/assets/src/components/Products.js:160
|
369 |
-
msgid "Loading more results..."
|
370 |
-
msgstr ""
|
371 |
-
|
372 |
-
#: admin/assets/src/components/SaveChanges.js:63
|
373 |
-
msgid "Discard changes"
|
374 |
-
msgstr ""
|
375 |
-
|
376 |
-
#: admin/assets/src/components/SaveChanges.js:64
|
377 |
-
msgid "Save all changes"
|
378 |
-
msgstr ""
|
379 |
-
|
380 |
-
#: admin/assets/src/components/ScreenOptions.js:33
|
381 |
-
msgid "Show columns"
|
382 |
-
msgstr ""
|
1 |
+
# Copyright (C) 2022 StoreApps
|
2 |
+
# This file is distributed under the GNU General Public License v3.0.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Stock Manager for WooCommerce 2.9.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-stock-manager\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-10-20T11:28:13+05:30\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.6.0\n"
|
15 |
"X-Domain: woocommerce-stock-manager\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
34 |
msgid "https://www.storeapps.org/"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: admin/class-stock-manager-admin.php:139
|
38 |
+
msgid "No shipping class"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: admin/class-stock-manager-admin.php:156
|
42 |
+
msgid "Taxable"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: admin/class-stock-manager-admin.php:157
|
46 |
+
msgid "Shipping only"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: admin/class-stock-manager-admin.php:158
|
50 |
+
msgctxt "Tax status"
|
51 |
+
msgid "None"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: admin/class-stock-manager-admin.php:161
|
55 |
+
msgid "No"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: admin/class-stock-manager-admin.php:162
|
59 |
+
msgid "Notify"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: admin/class-stock-manager-admin.php:163
|
63 |
+
msgid "Yes"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: admin/class-stock-manager-admin.php:223
|
67 |
+
#: admin/class-stock-manager-admin.php:224
|
68 |
+
msgid "Stock Manager"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: admin/class-stock-manager-admin.php:247
|
72 |
+
#: admin/class-stock-manager-admin.php:248
|
73 |
+
msgid "Import/Export"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: admin/class-stock-manager-admin.php:255
|
77 |
+
#: admin/class-stock-manager-admin.php:256
|
78 |
+
msgid "Stock log"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: admin/class-stock-manager-admin.php:263
|
82 |
+
msgid "Stock Manager Setting"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: admin/class-stock-manager-admin.php:264
|
86 |
+
msgid "Setting"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: admin/class-stock-manager-admin.php:271
|
90 |
+
#: admin/class-stock-manager-admin.php:272
|
91 |
+
msgid "StoreApps Plugins"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#. translators: %1$s & %2$s: Opening & closing strong tag. %3$s: link to Stock Manager for WooCommerce on WordPress.org
|
95 |
+
#: admin/class-stock-manager-admin.php:421
|
96 |
+
msgid "If you are liking %1$sStock Manager for WooCommerce%2$s, please rate us %3$s. A huge thanks from StoreApps in advance!"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
#: admin/views/import-export.php:121
|
100 |
msgid "Import"
|
101 |
msgstr ""
|
118 |
|
119 |
#: admin/views/import-export.php:130
|
120 |
#: admin/views/import-export.php:153
|
|
|
121 |
msgid "ID"
|
122 |
msgstr ""
|
123 |
|
124 |
#: admin/views/import-export.php:131
|
125 |
#: admin/views/import-export.php:154
|
126 |
#: admin/views/log.php:29
|
|
|
|
|
|
|
127 |
msgid "SKU"
|
128 |
msgstr ""
|
129 |
|
130 |
#: admin/views/import-export.php:132
|
|
|
|
|
131 |
msgid "Product name"
|
132 |
msgstr ""
|
133 |
|
134 |
#: admin/views/import-export.php:133
|
135 |
#: admin/views/import-export.php:155
|
|
|
|
|
136 |
msgid "Manage stock"
|
137 |
msgstr ""
|
138 |
|
139 |
#: admin/views/import-export.php:134
|
140 |
#: admin/views/import-export.php:156
|
|
|
|
|
|
|
141 |
msgid "Stock status"
|
142 |
msgstr ""
|
143 |
|
144 |
#: admin/views/import-export.php:135
|
145 |
#: admin/views/import-export.php:157
|
|
|
|
|
146 |
msgid "Backorders"
|
147 |
msgstr ""
|
148 |
|
150 |
#: admin/views/import-export.php:158
|
151 |
#: admin/views/log-history.php:49
|
152 |
#: admin/views/log.php:33
|
|
|
|
|
153 |
msgid "Stock"
|
154 |
msgstr ""
|
155 |
|
156 |
#: admin/views/import-export.php:137
|
157 |
#: admin/views/log.php:31
|
|
|
158 |
msgid "Product type"
|
159 |
msgstr ""
|
160 |
|
276 |
msgid "Active old styles"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: sa-includes/class-sa-wsm-in-app-offer.php:126
|
280 |
+
msgctxt "timezone date format"
|
281 |
+
msgid "Y-m-d H:i:s"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: sa-includes/class-sa-wsm-in-app-offer.php:228
|
285 |
+
msgid "Dismiss"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: sa-includes/class-sa-wsm-in-app-offer.php:228
|
289 |
+
msgid "Hide this"
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
msgstr ""
|
291 |
|
292 |
#: woocommerce-stock-manager.php:76
|
304 |
#: woocommerce-stock-manager.php:272
|
305 |
msgid "All done! Close."
|
306 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,59 +3,56 @@ Contributors: storeapps, niravmehta, mansi shah, Tarun.Parswani, Musilda
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
|
4 |
Author URI: https://www.storeapps.org/
|
5 |
Plugin URI: https://www.storeapps.org/woocommerce-plugins/?utm_source=wprepo&utm_medium=web&utm_campaign=wsm_readme
|
6 |
-
Tags: stock manager, woocommerce, stock management, inventory
|
7 |
Requires at least: 5.0.0
|
8 |
-
Tested up to: 6.0.
|
9 |
Requires PHP: 5.6
|
10 |
-
Stable tag: 2.
|
11 |
License: GPLv3
|
12 |
|
|
|
|
|
13 |
== Description ==
|
14 |
|
15 |
-
Stock Manager
|
|
|
|
|
16 |
|
17 |
> Stock Manager for WooCommerce plugin is completely Free to use.
|
18 |
> There's no paid or Pro version of this plugin.
|
19 |
|
20 |
-
####
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
**Product stock history**
|
53 |
-
|
54 |
-
In Stock log page, you can see the products stock history.
|
55 |
-
|
56 |
-
**Import/Export**
|
57 |
-
|
58 |
-
With Stock Manager for WooCommerce plugin, it is possible export all stock data of your shop, edit them and import back with CSV file.
|
59 |
(This feature needs refactoring, so use this only on your own risk).
|
60 |
|
61 |
* Export file structure:
|
@@ -63,21 +60,25 @@ With Stock Manager for WooCommerce plugin, it is possible export all stock data
|
|
63 |
* SKU - product unique identificator, required.
|
64 |
* Product name - Name/title of the product
|
65 |
* Manage stock - values: "yes", "notify", "no". If is empty "no" will be save.
|
66 |
-
* Stock status - values: "instock", "outofstock". If is empty "outofstock" will be
|
67 |
-
* Backorders - values: "yes", "notify", "no". If is empty "no" will be
|
68 |
* Stock - quantity value.
|
69 |
* Type - type of product.
|
70 |
* Parent ID - if product is variant, parent product ID is displayed for better filtering csv file.
|
71 |
|
72 |
GDPR ready - plugin doesn't collect personal data.
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
|
|
|
|
|
|
|
|
77 |
|
78 |
**Contribute**
|
79 |
|
80 |
-
Want to add a new language to Stock Manager for WooCommerce? Contribute via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/woocommerce-stock-manager/).
|
81 |
|
82 |
**Have any questions?**
|
83 |
|
@@ -86,21 +87,21 @@ Feel free to [contact us](https://www.storeapps.org/support/contact-us/?utm_sour
|
|
86 |
**Recommended Readings for faster WooCommerce stock management**
|
87 |
|
88 |
1. [How to bulk edit sale price and regular price](https://www.storeapps.org/woocommerce-bulk-edit-price/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
89 |
-
2. [How to manage Backorders in bulk
|
90 |
3. [How to create Excel-like custom views to manage product stock](https://www.storeapps.org/excel-custom-views-woocommerce-wordpress/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
91 |
4. [How to Delete all products](https://www.storeapps.org/woocommerce-delete-all-products/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
92 |
5. [How to manage stock 10x faster](https://www.storeapps.org/woocommerce-stock-management/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
93 |
6. [How to search products by SKU](https://www.storeapps.org/woocommerce-search-by-sku/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
94 |
-
7. [How to export products based on advanced search and admin column filters
|
95 |
-
8. [How to bulk edit
|
96 |
9. [How to manage Admin Columns for stock fields](https://www.storeapps.org/wordpress-admin-columns/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
97 |
|
98 |
**Some of our other free plugins**
|
99 |
|
100 |
-
1. [Smart Manager for WooCommerce](https://wordpress.org/plugins/smart-manager-for-wp-e-commerce/) - Manage and bulk edit WooCommerce products, variations, orders, coupons, any WordPress post type
|
101 |
-
2. [Temporary Login Without Password](https://wordpress.org/plugins/temporary-login-without-password/)
|
102 |
-
3. [Icegram](https://wordpress.org/plugins/icegram/) - Popups,
|
103 |
-
4. [Email Subscribers & Newsletters](https://wordpress.org/plugins/email-subscribers/)
|
104 |
|
105 |
**StoreApps’ other Pro plugins**
|
106 |
|
@@ -112,7 +113,7 @@ Feel free to [contact us](https://www.storeapps.org/support/contact-us/?utm_sour
|
|
112 |
6. [Frequently Bought Together For WooCommerce](https://www.storeapps.org/product/frequently-bought-together-woocommerce/?utm_source=wprepo&utm_medium=web_se&utm_campaign=wsm_readme) - Show users related products or recommendations to the product they are already viewing.
|
113 |
7. [Express Login For WordPress](https://www.storeapps.org/product/express-login-for-wordpress/?utm_source=wprepo&utm_medium=web_se&utm_campaign=wsm_readme) - Create secure, auto-login links for WordPress and WooCommerce without the need for a username and password.
|
114 |
|
115 |
-
[
|
116 |
|
117 |
== Installation ==
|
118 |
|
@@ -149,6 +150,11 @@ Be sure, that you have active stock manager.
|
|
149 |
4. Product stock as on date
|
150 |
|
151 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
= 2.8.3 (18.11.2021) =
|
154 |
* New: WooCommerce 5.9.0 compatible
|
@@ -282,6 +288,9 @@ For the changelog of earlier versions, please refer to the separate [changelog.t
|
|
282 |
|
283 |
== Upgrade Notice ==
|
284 |
|
|
|
|
|
|
|
285 |
= 2.8.3 =
|
286 |
WooCommerce 5.9.0 compatible
|
287 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPTHCDC382KVA
|
4 |
Author URI: https://www.storeapps.org/
|
5 |
Plugin URI: https://www.storeapps.org/woocommerce-plugins/?utm_source=wprepo&utm_medium=web&utm_campaign=wsm_readme
|
6 |
+
Tags: woocommerce stock management, woocommerce stock manager, woocommerce product stock manager, woocommerce stock management free, woocommerce inventory management
|
7 |
Requires at least: 5.0.0
|
8 |
+
Tested up to: 6.0.3
|
9 |
Requires PHP: 5.6
|
10 |
+
Stable tag: 2.9.0
|
11 |
License: GPLv3
|
12 |
|
13 |
+
Best WooCommerce stock management plugin to manage and edit product stock and their variables from a single dashboard. Stock log, import/export, filters and more...
|
14 |
+
|
15 |
== Description ==
|
16 |
|
17 |
+
Stock Manager is a powerful WooCommerce stock management plugin that allows you to manage product stock and their variations from one screen.
|
18 |
+
|
19 |
+
Edit and manage product stock status, quantity, prices, SKU, taxes. etc., apply quick filters and view stock history, import and export stock data to CSV.
|
20 |
|
21 |
> Stock Manager for WooCommerce plugin is completely Free to use.
|
22 |
> There's no paid or Pro version of this plugin.
|
23 |
|
24 |
+
####WooCommerce stock management dashboard
|
25 |
+
|
26 |
+
You don’t need to visit each product page to view and edit stock fields. Stock Manager plugin provides a dashboard to view all product stock and inventory information details at one place...and some cool features:
|
27 |
+
|
28 |
+
- **Table editor** - Make edits to stock data using table cells and dropdown. Simple and fast.
|
29 |
+
- **Inline edit** - Create, remove or update as many stock items. You can save each product or variations separately or save all displayed data at once.
|
30 |
+
- **Stock and price management** - Navigate through the dashboard and make edits to the following product stock data fields:
|
31 |
+
-- SKU
|
32 |
+
-- Product name
|
33 |
+
-- Tax status
|
34 |
+
-- Tax class
|
35 |
+
-- Shipping class
|
36 |
+
-- Price
|
37 |
+
-- Sale price
|
38 |
+
-- Weight
|
39 |
+
-- Manage stock
|
40 |
+
-- Stock status
|
41 |
+
-- Backorders
|
42 |
+
-- Stock
|
43 |
+
- **Support for all product types** - Simple, variable, external/affiliate, grouped...
|
44 |
+
- **Admin columns** - Show/hide columns based on your requirements, thus making the dashboard look clean.
|
45 |
+
- **Pre-defined Search Filters** - The plugin gives you three predefined filters (facets) – Product Category, Product Type and Stock Status to make edits. You can also search and sort using SKU and product name.
|
46 |
+
- View **product thumbnail image.**
|
47 |
+
- Edit the variations for variable products after clicking on the “Show variables” button.
|
48 |
+
|
49 |
+
####Product stock history
|
50 |
+
|
51 |
+
Stock Manager for WooCommerce plugin provides a **Stock log page**, wherein you can see each product’s stock history. This helps you track the stock movement for each product.
|
52 |
+
|
53 |
+
###Import/Export
|
54 |
+
|
55 |
+
Export all stock data of your shop, edit them and import back with a CSV file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
(This feature needs refactoring, so use this only on your own risk).
|
57 |
|
58 |
* Export file structure:
|
60 |
* SKU - product unique identificator, required.
|
61 |
* Product name - Name/title of the product
|
62 |
* Manage stock - values: "yes", "notify", "no". If is empty "no" will be save.
|
63 |
+
* Stock status - values: "instock", "outofstock". If is empty "outofstock" will be saved.
|
64 |
+
* Backorders - values: "yes", "notify", "no". If is empty "no" will be saved.
|
65 |
* Stock - quantity value.
|
66 |
* Type - type of product.
|
67 |
* Parent ID - if product is variant, parent product ID is displayed for better filtering csv file.
|
68 |
|
69 |
GDPR ready - plugin doesn't collect personal data.
|
70 |
|
71 |
+
###Bulk edit and manage custom fields
|
72 |
|
73 |
+
>To bulk edit and manage custom field(s) for any post type like WooCommerce products, orders, coupons, posts, users, subscriptions, bookings, memberships, etc., use our [Smart Manager for WooCommerce](https://wordpress.org/plugins/smart-manager-for-wp-e-commerce/) plugin.
|
74 |
+
|
75 |
+
**Spread The Love**
|
76 |
+
|
77 |
+
If you like Stock Manager for WooCommerce plugin, please consider leaving [five stars](https://wordpress.org/support/plugin/woocommerce-stock-manager/reviews/#new-post) for the plugin. That helps fellow website owners assess plugin easily and benefit from it!
|
78 |
|
79 |
**Contribute**
|
80 |
|
81 |
+
Want to add a new language to the Stock Manager for WooCommerce? Contribute via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/woocommerce-stock-manager/).
|
82 |
|
83 |
**Have any questions?**
|
84 |
|
87 |
**Recommended Readings for faster WooCommerce stock management**
|
88 |
|
89 |
1. [How to bulk edit sale price and regular price](https://www.storeapps.org/woocommerce-bulk-edit-price/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
90 |
+
2. [How to manage Backorders in bulk](https://www.storeapps.org/woocommerce-backorder/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
91 |
3. [How to create Excel-like custom views to manage product stock](https://www.storeapps.org/excel-custom-views-woocommerce-wordpress/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
92 |
4. [How to Delete all products](https://www.storeapps.org/woocommerce-delete-all-products/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
93 |
5. [How to manage stock 10x faster](https://www.storeapps.org/woocommerce-stock-management/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
94 |
6. [How to search products by SKU](https://www.storeapps.org/woocommerce-search-by-sku/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
95 |
+
7. [How to export products based on advanced search and admin column filters](https://www.storeapps.org/woocommerce-search-by-sku/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
96 |
+
8. [How to bulk edit attributes](https://www.storeapps.org/woocommerce-bulk-edit-attributes/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
97 |
9. [How to manage Admin Columns for stock fields](https://www.storeapps.org/wordpress-admin-columns/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos)
|
98 |
|
99 |
**Some of our other free plugins**
|
100 |
|
101 |
+
1. [Smart Manager for WooCommerce](https://wordpress.org/plugins/smart-manager-for-wp-e-commerce/) - Manage and bulk edit WooCommerce products, variations, orders, coupons, any WordPress post type...all from a single screen using an Excel-like sheet editor.
|
102 |
+
2. [Temporary Login Without Password](https://wordpress.org/plugins/temporary-login-without-password/) - Create secure, self-expiring, automatic login links for WordPress.
|
103 |
+
3. [Icegram](https://wordpress.org/plugins/icegram/) - Popups, header footer bars, optins and lead generation plugin.
|
104 |
+
4. [Email Subscribers & Newsletters](https://wordpress.org/plugins/email-subscribers/) - Collect leads, send automated new blog post notification emails, create & send broadcasts.
|
105 |
|
106 |
**StoreApps’ other Pro plugins**
|
107 |
|
113 |
6. [Frequently Bought Together For WooCommerce](https://www.storeapps.org/product/frequently-bought-together-woocommerce/?utm_source=wprepo&utm_medium=web_se&utm_campaign=wsm_readme) - Show users related products or recommendations to the product they are already viewing.
|
114 |
7. [Express Login For WordPress](https://www.storeapps.org/product/express-login-for-wordpress/?utm_source=wprepo&utm_medium=web_se&utm_campaign=wsm_readme) - Create secure, auto-login links for WordPress and WooCommerce without the need for a username and password.
|
115 |
|
116 |
+
[Check out all our WooCommerce plugins](https://www.storeapps.org/woocommerce-plugins/?utm_source=wprepo&utm_medium=web_others&utm_campaign=wsm_readme)
|
117 |
|
118 |
== Installation ==
|
119 |
|
150 |
4. Product stock as on date
|
151 |
|
152 |
== Changelog ==
|
153 |
+
= 2.9.0 (20.10.2022) =
|
154 |
+
* New: WooCommerce 7.0.0 compatible
|
155 |
+
* New: WordPress 6.0.3 compatible
|
156 |
+
* Update: Readme file changes
|
157 |
+
* Update: POT file
|
158 |
|
159 |
= 2.8.3 (18.11.2021) =
|
160 |
* New: WooCommerce 5.9.0 compatible
|
288 |
|
289 |
== Upgrade Notice ==
|
290 |
|
291 |
+
= 2.9.0 =
|
292 |
+
WooCommerce 7.0.0 compatible, WordPress 6.0.3 compatible, Readme file changes, POT file
|
293 |
+
|
294 |
= 2.8.3 =
|
295 |
WooCommerce 5.9.0 compatible
|
296 |
|
sa-includes/class-sa-in-app-offers.php
DELETED
@@ -1,203 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Stock Manager in app offers
|
4 |
-
*
|
5 |
-
* @package woocommerce-stock-manager/sa-includes/
|
6 |
-
* @version 1.2.3
|
7 |
-
*/
|
8 |
-
|
9 |
-
// Exit if accessed directly.
|
10 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
11 |
-
exit;
|
12 |
-
}
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Class for handling in app offer in Stock Manager for WooCommerce
|
16 |
-
*/
|
17 |
-
class SA_In_App_Offers {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Variable to hold instance of this class
|
21 |
-
*
|
22 |
-
* @var $instance
|
23 |
-
*/
|
24 |
-
private static $instance = null;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* The plugin file
|
28 |
-
*
|
29 |
-
* @var string $plugin_file
|
30 |
-
*/
|
31 |
-
public $plugin_file = '';
|
32 |
-
|
33 |
-
/**
|
34 |
-
* The plugin url
|
35 |
-
*
|
36 |
-
* @var string $plugin_file
|
37 |
-
*/
|
38 |
-
public $plugin_url = '';
|
39 |
-
|
40 |
-
/**
|
41 |
-
* The prefix
|
42 |
-
*
|
43 |
-
* @var string $prefix
|
44 |
-
*/
|
45 |
-
public $prefix = '';
|
46 |
-
|
47 |
-
/**
|
48 |
-
* The option name
|
49 |
-
*
|
50 |
-
* @var string $option_name
|
51 |
-
*/
|
52 |
-
public $option_name = '';
|
53 |
-
|
54 |
-
/**
|
55 |
-
* The campaign
|
56 |
-
*
|
57 |
-
* @var string $campaign
|
58 |
-
*/
|
59 |
-
public $campaign = '';
|
60 |
-
|
61 |
-
/**
|
62 |
-
* The start
|
63 |
-
*
|
64 |
-
* @var string $start
|
65 |
-
*/
|
66 |
-
public $start = '';
|
67 |
-
|
68 |
-
/**
|
69 |
-
* The end
|
70 |
-
*
|
71 |
-
* @var string $end
|
72 |
-
*/
|
73 |
-
public $end = '';
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Is plugin page
|
77 |
-
*
|
78 |
-
* @var bool $end
|
79 |
-
*/
|
80 |
-
public $is_plugin_page = false;
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Constructor
|
84 |
-
*
|
85 |
-
* @param array $args Configuration.
|
86 |
-
*/
|
87 |
-
public function __construct( $args ) {
|
88 |
-
|
89 |
-
$this->plugin_file = ( ! empty( $args['file'] ) ) ? $args['file'] : '';
|
90 |
-
$this->prefix = ( ! empty( $args['prefix'] ) ) ? $args['prefix'] : '';
|
91 |
-
$this->option_name = ( ! empty( $args['option_name'] ) ) ? $args['option_name'] : '';
|
92 |
-
$this->campaign = ( ! empty( $args['campaign'] ) ) ? $args['campaign'] : '';
|
93 |
-
$this->start = ( ! empty( $args['start'] ) ) ? $args['start'] : '';
|
94 |
-
$this->end = ( ! empty( $args['end'] ) ) ? $args['end'] : '';
|
95 |
-
$this->is_plugin_page = ( ! empty( $args['is_plugin_page'] ) ) ? $args['is_plugin_page'] : false;
|
96 |
-
|
97 |
-
add_action( 'admin_notices', array( $this, 'in_app_offer' ) );
|
98 |
-
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Get single instance of this class
|
103 |
-
*
|
104 |
-
* @param array $args Configuration.
|
105 |
-
* @return Singleton object of this class
|
106 |
-
*/
|
107 |
-
public static function get_instance( $args ) {
|
108 |
-
// Check if instance is already exists.
|
109 |
-
if ( is_null( self::$instance ) ) {
|
110 |
-
self::$instance = new self( $args );
|
111 |
-
}
|
112 |
-
|
113 |
-
return self::$instance;
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Whether to show or not
|
118 |
-
*
|
119 |
-
* @return boolean
|
120 |
-
*/
|
121 |
-
public function is_show() {
|
122 |
-
|
123 |
-
$timezone_format = _x( 'Y-m-d H:i:s', 'timezone date format' );
|
124 |
-
$current_date = strtotime( date_i18n( $timezone_format ) );
|
125 |
-
$start = strtotime( $this->start );
|
126 |
-
$end = strtotime( $this->end );
|
127 |
-
if ( ( $current_date >= $start ) && ( $current_date <= $end ) ) {
|
128 |
-
$option_value = get_option( $this->option_name, '' );
|
129 |
-
$get_post_type = ( ! empty( $_GET['post_type'] ) ) ? wc_clean( wp_unslash( $_GET['post_type'] ) ) : ''; // phpcs:ignore
|
130 |
-
|
131 |
-
if ( ( 'product' === $get_post_type || $this->is_plugin_page ) && '' === $option_value ) {
|
132 |
-
return true;
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
return false;
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* The offer content
|
142 |
-
*/
|
143 |
-
public function in_app_offer() {
|
144 |
-
if ( $this->is_show() ) {
|
145 |
-
?>
|
146 |
-
<div class="sa_offer_container"><?php $this->show_offer_content(); ?></div>
|
147 |
-
<?php
|
148 |
-
}
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* The offer content
|
153 |
-
*/
|
154 |
-
public function show_offer_content() {
|
155 |
-
$sa_offer_2021 = get_option( $this->option_name, '' );
|
156 |
-
if ( 'no' === $sa_offer_2021 ) {
|
157 |
-
return;
|
158 |
-
}
|
159 |
-
|
160 |
-
if ( ! wp_script_is( 'jquery' ) ) {
|
161 |
-
wp_enqueue_script( 'jquery' );
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( 'wsm' === $this->prefix ) {
|
165 |
-
?>
|
166 |
-
<style type="text/css">
|
167 |
-
.sa_offer {
|
168 |
-
margin: 1em auto;
|
169 |
-
text-align: center;
|
170 |
-
font-size: 1.2em;
|
171 |
-
line-height: 1em;
|
172 |
-
padding: 1em;
|
173 |
-
}
|
174 |
-
.sa_dismiss {
|
175 |
-
font-size: 0.5em;
|
176 |
-
display: inline-block;
|
177 |
-
width: 100%;
|
178 |
-
text-align: center;
|
179 |
-
letter-spacing: 2px;
|
180 |
-
}
|
181 |
-
</style>
|
182 |
-
<div class="sa_offer">
|
183 |
-
<div class="sa_offer_content">
|
184 |
-
<a href="https://www.storeapps.org/woocommerce-plugins/?utm_source=in_app&utm_medium=<?php echo esc_attr( $this->prefix ); ?>_banner&utm_campaign=<?php echo esc_attr( $this->campaign ); ?>" target="_blank">
|
185 |
-
<img src="<?php echo esc_url( plugins_url( 'sa-includes/images/BFCM-2021-800-200.png', $this->plugin_file ) ); ?>" />
|
186 |
-
</a>
|
187 |
-
<div class="sa_dismiss"> <!-- Do not change this class -->
|
188 |
-
<a href="?wsm_dismiss_admin_notice=1&option_name=sa_offer_bfcm_2021" style="color: grey; text-decoration: none;"><?php echo esc_html__( 'Hide this' ); ?></a>
|
189 |
-
</div>
|
190 |
-
</div>
|
191 |
-
</div>
|
192 |
-
<?php
|
193 |
-
}
|
194 |
-
?>
|
195 |
-
<script type="text/javascript">
|
196 |
-
jQuery(function(){
|
197 |
-
jQuery('div.sa_offer').not(':eq(0)').hide(); // To hide offer div if present multiple times.
|
198 |
-
});
|
199 |
-
</script>
|
200 |
-
<?php
|
201 |
-
}
|
202 |
-
|
203 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sa-includes/class-sa-wsm-in-app-offer.php
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* StoreApps In app offer
|
4 |
+
*
|
5 |
+
* @category Class
|
6 |
+
* @author StoreApps
|
7 |
+
* @package StoreApps
|
8 |
+
* @version 1.1.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly.
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Class for handling in app offer for StoreApps
|
17 |
+
*/
|
18 |
+
class SA_WSM_In_App_Offer {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Variable to hold instance of this class
|
22 |
+
*
|
23 |
+
* @var $instance
|
24 |
+
*/
|
25 |
+
private static $instance = null;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* The plugin file
|
29 |
+
*
|
30 |
+
* @var string $plugin_file
|
31 |
+
*/
|
32 |
+
public $plugin_file = '';
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The plugin url
|
36 |
+
*
|
37 |
+
* @var string $plugin_file
|
38 |
+
*/
|
39 |
+
public $plugin_url = '';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* The prefix
|
43 |
+
*
|
44 |
+
* @var string $prefix
|
45 |
+
*/
|
46 |
+
public $prefix = '';
|
47 |
+
|
48 |
+
/**
|
49 |
+
* The option name
|
50 |
+
*
|
51 |
+
* @var string $option_name
|
52 |
+
*/
|
53 |
+
public $option_name = '';
|
54 |
+
|
55 |
+
/**
|
56 |
+
* The campaign
|
57 |
+
*
|
58 |
+
* @var string $campaign
|
59 |
+
*/
|
60 |
+
public $campaign = '';
|
61 |
+
|
62 |
+
/**
|
63 |
+
* The start
|
64 |
+
*
|
65 |
+
* @var string $start
|
66 |
+
*/
|
67 |
+
public $start = '';
|
68 |
+
|
69 |
+
/**
|
70 |
+
* The end
|
71 |
+
*
|
72 |
+
* @var string $end
|
73 |
+
*/
|
74 |
+
public $end = '';
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Is plugin page
|
78 |
+
*
|
79 |
+
* @var bool $end
|
80 |
+
*/
|
81 |
+
public $is_plugin_page = false;
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Constructor
|
85 |
+
*
|
86 |
+
* @param array $args Configuration.
|
87 |
+
*/
|
88 |
+
public function __construct( $args ) {
|
89 |
+
|
90 |
+
$this->plugin_file = ( ! empty( $args['file'] ) ) ? $args['file'] : '';
|
91 |
+
$this->prefix = ( ! empty( $args['prefix'] ) ) ? $args['prefix'] : '';
|
92 |
+
$this->option_name = ( ! empty( $args['option_name'] ) ) ? $args['option_name'] : '';
|
93 |
+
$this->campaign = ( ! empty( $args['campaign'] ) ) ? $args['campaign'] : '';
|
94 |
+
$this->start = ( ! empty( $args['start'] ) ) ? $args['start'] : '';
|
95 |
+
$this->end = ( ! empty( $args['end'] ) ) ? $args['end'] : '';
|
96 |
+
$this->is_plugin_page = ( ! empty( $args['is_plugin_page'] ) ) ? $args['is_plugin_page'] : false;
|
97 |
+
|
98 |
+
add_action( 'admin_footer', array( $this, 'admin_styles_and_scripts' ) );
|
99 |
+
add_action( 'admin_notices', array( $this, 'in_app_offer' ) );
|
100 |
+
add_action( 'wp_ajax_' . $this->prefix . '_dismiss_action', array( $this, 'dismiss_action' ) );
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Get single instance of this class
|
106 |
+
*
|
107 |
+
* @param array $args Configuration.
|
108 |
+
* @return Singleton object of this class
|
109 |
+
*/
|
110 |
+
public static function get_instance( $args ) {
|
111 |
+
// Check if instance is already exists.
|
112 |
+
if ( is_null( self::$instance ) ) {
|
113 |
+
self::$instance = new self( $args );
|
114 |
+
}
|
115 |
+
|
116 |
+
return self::$instance;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Whether to show or not
|
121 |
+
*
|
122 |
+
* @return boolean
|
123 |
+
*/
|
124 |
+
public function is_show() {
|
125 |
+
|
126 |
+
$timezone_format = _x( 'Y-m-d H:i:s', 'timezone date format', 'woocommerce-stock-manager' );
|
127 |
+
$current_date = strtotime( date_i18n( $timezone_format ) );
|
128 |
+
$start = strtotime( $this->start );
|
129 |
+
$end = strtotime( $this->end );
|
130 |
+
if ( ( $current_date >= $start ) && ( $current_date <= $end ) ) {
|
131 |
+
$option_value = get_option( $this->option_name, 'yes' );
|
132 |
+
$get_post_type = isset( $_GET['post_type'] ) ? sanitize_text_field( wp_unslash( $_GET['post_type'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification
|
133 |
+
|
134 |
+
if ( ( 'product' === $get_post_type || $this->is_plugin_page ) && 'yes' === $option_value ) {
|
135 |
+
return true;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
return false;
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Admin styles & scripts
|
145 |
+
*/
|
146 |
+
public function admin_styles_and_scripts() {
|
147 |
+
|
148 |
+
if ( $this->is_show() ) {
|
149 |
+
|
150 |
+
if ( ! wp_script_is( 'jquery' ) ) {
|
151 |
+
wp_enqueue_script( 'jquery' );
|
152 |
+
}
|
153 |
+
|
154 |
+
?>
|
155 |
+
<script type="text/javascript">
|
156 |
+
jQuery(function(){
|
157 |
+
jQuery('.sa_offer_container').on('click', '.sa_dismiss a', function(){
|
158 |
+
jQuery.ajax({
|
159 |
+
url: '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>',
|
160 |
+
type: 'post',
|
161 |
+
dataType: 'json',
|
162 |
+
data: {
|
163 |
+
action: '<?php echo esc_html( $this->prefix ); ?>_dismiss_action',
|
164 |
+
security: '<?php echo esc_html( wp_create_nonce( $this->prefix . '-dismiss-action' ) ); ?>'
|
165 |
+
},
|
166 |
+
success: function( response ){
|
167 |
+
if ( response.success != undefined && response.success != '' && response.success == 'yes' ) {
|
168 |
+
jQuery('.sa_offer_container').fadeOut(500, function(){ jQuery('.sa_offer_container').remove(); });
|
169 |
+
}
|
170 |
+
}
|
171 |
+
});
|
172 |
+
return false;
|
173 |
+
});
|
174 |
+
});
|
175 |
+
</script>
|
176 |
+
<?php
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* The offer content
|
184 |
+
*/
|
185 |
+
public function in_app_offer() {
|
186 |
+
|
187 |
+
if ( $this->is_show() ) {
|
188 |
+
?>
|
189 |
+
<div class="sa_offer_container"><?php $this->show_offer_content(); ?></div>
|
190 |
+
<?php
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* The offer content
|
196 |
+
*/
|
197 |
+
public function show_offer_content() {
|
198 |
+
if ( ! wp_script_is( 'jquery' ) ) {
|
199 |
+
wp_enqueue_script( 'jquery' );
|
200 |
+
}
|
201 |
+
|
202 |
+
?>
|
203 |
+
<style type="text/css">
|
204 |
+
.sa_offer {
|
205 |
+
margin: 1em auto;
|
206 |
+
text-align: center;
|
207 |
+
font-size: 1.2em;
|
208 |
+
line-height: 1em;
|
209 |
+
padding: 1em;
|
210 |
+
}
|
211 |
+
.sa_offer_content img {
|
212 |
+
width: 55%;
|
213 |
+
}
|
214 |
+
.sa_dismiss {
|
215 |
+
font-size: 0.5em;
|
216 |
+
display: inline-block;
|
217 |
+
width: 100%;
|
218 |
+
text-align: center;
|
219 |
+
letter-spacing: 2px;
|
220 |
+
}
|
221 |
+
</style>
|
222 |
+
<div class="sa_offer">
|
223 |
+
<div class="sa_offer_content">
|
224 |
+
<a href="https://www.storeapps.org/woocommerce-plugins/?utm_source=in_app&utm_medium=<?php echo esc_attr( $this->prefix ); ?>_banner&utm_campaign=<?php echo esc_attr( $this->campaign ); ?>" target="_blank">
|
225 |
+
<img src="<?php echo esc_url( plugins_url( 'sa-includes/images/halloween-2022.png', $this->plugin_file ) ); ?>" />
|
226 |
+
</a>
|
227 |
+
<div class="sa_dismiss"> <!-- Do not change this class -->
|
228 |
+
<a href="javascript:void(0)" style="color: black; text-decoration: none;" title="<?php echo esc_attr__( 'Dismiss', 'woocommerce-stock-manager' ); ?>"><?php echo esc_html__( 'Hide this', 'woocommerce-stock-manager' ); ?></a>
|
229 |
+
</div>
|
230 |
+
</div>
|
231 |
+
</div>
|
232 |
+
<script type="text/javascript">
|
233 |
+
jQuery(function(){
|
234 |
+
jQuery('div.sa_offer').not(':eq(0)').hide(); // To hide offer div if present multiple times.
|
235 |
+
});
|
236 |
+
</script>
|
237 |
+
<?php
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Handle dismiss action
|
242 |
+
*/
|
243 |
+
public function dismiss_action() {
|
244 |
+
|
245 |
+
check_ajax_referer( $this->prefix . '-dismiss-action', 'security' );
|
246 |
+
|
247 |
+
update_option( $this->option_name, 'no', 'no' );
|
248 |
+
|
249 |
+
wp_send_json( array( 'success' => 'yes' ) );
|
250 |
+
|
251 |
+
}
|
252 |
+
|
253 |
+
}
|
sa-includes/images/BFCM-2021-800-200.png
DELETED
Binary file
|
sa-includes/images/halloween-2022.png
ADDED
Binary file
|
woocommerce-stock-manager.php
CHANGED
@@ -3,16 +3,16 @@
|
|
3 |
* Plugin Name: Stock Manager for WooCommerce
|
4 |
* Plugin URI: https://www.storeapps.org/woocommerce-plugins/
|
5 |
* Description: Manage product's stock and price in your WooCommerce store. Export/Import inventory, track history, sort and more...
|
6 |
-
* Version: 2.
|
7 |
* Author: StoreApps
|
8 |
* Author URI: https://www.storeapps.org/
|
9 |
* Developer: StoreApps
|
10 |
* Developer URI: https://www.storeapps.org/
|
11 |
* Requires at least: 5.0.0
|
12 |
-
* Tested up to: 6.0.
|
13 |
* Requires PHP: 5.6+
|
14 |
* WC requires at least: 3.5.0
|
15 |
-
* WC tested up to:
|
16 |
* Text Domain: woocommerce-stock-manager
|
17 |
* Domain Path: /languages/
|
18 |
* License: GNU General Public License v3.0
|
@@ -391,3 +391,56 @@ function get_woocommerce_stock_manager_plugin_version() {
|
|
391 |
|
392 |
return $plugin_version;
|
393 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: Stock Manager for WooCommerce
|
4 |
* Plugin URI: https://www.storeapps.org/woocommerce-plugins/
|
5 |
* Description: Manage product's stock and price in your WooCommerce store. Export/Import inventory, track history, sort and more...
|
6 |
+
* Version: 2.9.0
|
7 |
* Author: StoreApps
|
8 |
* Author URI: https://www.storeapps.org/
|
9 |
* Developer: StoreApps
|
10 |
* Developer URI: https://www.storeapps.org/
|
11 |
* Requires at least: 5.0.0
|
12 |
+
* Tested up to: 6.0.3
|
13 |
* Requires PHP: 5.6+
|
14 |
* WC requires at least: 3.5.0
|
15 |
+
* WC tested up to: 7.0.0
|
16 |
* Text Domain: woocommerce-stock-manager
|
17 |
* Domain Path: /languages/
|
18 |
* License: GNU General Public License v3.0
|
391 |
|
392 |
return $plugin_version;
|
393 |
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Function to check if WSM admin page.
|
397 |
+
*/
|
398 |
+
function is_wsm_admin_page() {
|
399 |
+
$page = ( ! empty( $_GET['page'] ) ) ? wc_clean( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore
|
400 |
+
if ( 'stock-manager' === $page || 'stock-manager-import-export' === $page || 'stock-manager-log' === $page || 'stock-manager-setting' === $page || 'stock-manager-storeapps-plugins' === $page ) {
|
401 |
+
return true;
|
402 |
+
}
|
403 |
+
|
404 |
+
return false;
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Function to show SA in app offers in WSM if any.
|
409 |
+
*
|
410 |
+
* @since: 2.5.2.
|
411 |
+
*/
|
412 |
+
function wsm_may_be_show_sa_in_app_offer() {
|
413 |
+
|
414 |
+
if ( ! class_exists( 'SA_WSM_In_App_Offer' ) && file_exists( STOCKDIR . 'sa-includes/class-sa-wsm-in-app-offer.php' ) ) {
|
415 |
+
include_once STOCKDIR . 'sa-includes/class-sa-wsm-in-app-offer.php';
|
416 |
+
|
417 |
+
$is_wsm_admin = is_wsm_admin_page();
|
418 |
+
|
419 |
+
$args = array(
|
420 |
+
'file' => STOCKDIR . 'sa-includes/',
|
421 |
+
'prefix' => 'wsm', // prefix/slug of your plugin.
|
422 |
+
'option_name' => 'sa_wsm_offer_halloween_2022',
|
423 |
+
'campaign' => 'sa_halloween_2022',
|
424 |
+
'start' => '2022-10-28 13:30:00',
|
425 |
+
'end' => '2022-11-03 06:00:00',
|
426 |
+
'is_plugin_page' => $is_wsm_admin ? true : false, // page where you want to show offer, do not send this if no plugin page is there and want to show offer on Products page.
|
427 |
+
);
|
428 |
+
$sa_offer = SA_WSM_In_App_Offer::get_instance( $args );
|
429 |
+
}
|
430 |
+
}
|
431 |
+
add_action( 'plugins_loaded', 'wsm_may_be_show_sa_in_app_offer' );
|
432 |
+
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Action for WooCommerce v7.1 custom order tables related compatibility.
|
436 |
+
*
|
437 |
+
* @since: 2.9.0.
|
438 |
+
*/
|
439 |
+
add_action(
|
440 |
+
'before_woocommerce_init',
|
441 |
+
function() {
|
442 |
+
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
|
443 |
+
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, false );
|
444 |
+
}
|
445 |
+
}
|
446 |
+
);
|