WooCommerce Stock Manager - Version 2.5.7

Version Description

'Cannot modify header information headers already sent' in some cases, jQuery error, POT file. Recommended upgrade.

Download this release

Release Info

Developer storeapps
Plugin Icon 128x128 WooCommerce Stock Manager
Version 2.5.7
Comparing to
See all releases

Code changes from version 2.5.6 to 2.5.7

admin/assets/js/subscribe.js CHANGED
@@ -1,6 +1,6 @@
 
1
  jQuery(function () {
2
- // For Klawoo subscribe
3
- jQuery("form[name=wsm_klawoo_subscribe]").submit(function (e) {
4
  e.preventDefault();
5
  var formData = {};
6
  jQuery.each(jQuery('form[name=wsm_klawoo_subscribe]').serializeArray(), function() {
1
+ // For Klawoo subscribe
2
  jQuery(function () {
3
+ jQuery("form[name=wsm_klawoo_subscribe]").on( 'submit', function (e) {
 
4
  e.preventDefault();
5
  var formData = {};
6
  jQuery.each(jQuery('form[name=wsm_klawoo_subscribe]').serializeArray(), function() {
admin/class-stock-manager-admin.php CHANGED
@@ -50,7 +50,7 @@ class Stock_Manager_Admin {
50
 
51
  include_once( 'includes/wcm-class-stock.php' );
52
 
53
- $this->includes();
54
 
55
  add_action( 'admin_init', array( $this, 'generate_csv_file' ) );
56
 
@@ -83,7 +83,7 @@ class Stock_Manager_Admin {
83
  *
84
  * @since 1.0.0
85
  */
86
- private function includes() {
87
  $is_wsm_admin = $this->is_wsm_admin_page();
88
  if ( $is_wsm_admin ) {
89
  $this->may_be_show_sa_in_app_offer();
@@ -186,14 +186,18 @@ class Stock_Manager_Admin {
186
  wp_set_script_translations( $this->plugin_slug . '-admin-script-react', 'stock-manager', STOCKDIR . 'languages' );
187
  }
188
 
189
- $is_wsm_admin = $this->is_wsm_admin_page();
190
- if ( $is_wsm_admin ) {
191
- $params = array(
192
- 'ajax_nonce' => wp_create_nonce( 'wsm_update' ),
193
- );
194
- wp_localize_script( $this->plugin_slug . '-admin-script-w', 'ajax_object', $params );
195
- wp_enqueue_script( $this->plugin_slug . '-admin-script-w', plugins_url( 'assets/js/subscribe.js', __FILE__ ), array( 'jquery' ), Stock_Manager::VERSION );
196
-
 
 
 
 
197
  }
198
  }
199
 
@@ -490,39 +494,37 @@ class Stock_Manager_Admin {
490
 
491
  if ( empty( $wsm_dismiss_admin_notice ) ) {
492
  ?>
493
- <style type="text/css">
494
  #wsm_promo_msg {
495
  display: block !important;
496
  background-color: #f2f6fc;
497
- color: #fff;
498
  border-left-color: #5850ec;
499
  }
500
  #wsm_promo_msg table {
501
  width: 100%;
502
  padding-bottom: 0.25em;
503
  }
504
- #wsm_promo_msg #dashicon {
505
- width: 3%;
506
- }
507
  #wsm_dashicon {
508
  padding: 0.5em;
 
509
  }
510
  #wsm_promo_msg_content {
511
  padding: 0.5em;
512
  }
513
  #wsm_promo_msg .dashicons.dashicons-awards {
514
- font-size: 4em;
515
  color: #b08d57;
516
  margin-left: -0.2em;
517
  margin-bottom: 0.65em;
518
  }
519
  .wsm_headline {
520
  padding: 0.5em 0;
521
- font-size: 1.1em;
522
  }
523
  form.wsm_klawoo_subscribe {
524
  padding: 0.5em 0;
525
  margin-block-end: 0 !important;
 
526
  }
527
  form.wsm_klawoo_subscribe #email {
528
  width: 14em;
@@ -536,7 +538,7 @@ class Stock_Manager_Admin {
536
  margin-right: 0.5em;
537
  }
538
  form.wsm_klawoo_subscribe #wsm_submit {
539
- font-size: 1.1em;
540
  line-height: 0em;
541
  margin-top: 0;
542
  font-weight: bold;
@@ -544,7 +546,7 @@ class Stock_Manager_Admin {
544
  border-color: #5850ec;
545
  }
546
  .wsm_success {
547
- font-size: 1.3em;
548
  font-weight: bold;
549
  }
550
  </style>
@@ -560,7 +562,7 @@ class Stock_Manager_Admin {
560
  <form name="wsm_klawoo_subscribe" class="wsm_klawoo_subscribe" action="#" method="POST" accept-charset="utf-8">
561
  <input type="email" class="regular-text ltr" name="email" id="email" placeholder="Your email address" required="required" />
562
  <input type="checkbox" name="wsm_gdpr_agree" id="wsm_gdpr_agree" value="1" required="required" />
563
- <label for="wsm_gdpr_agree" class="wsm_gdpr_label">I have read and agreed to your <a href="https://www.storeapps.org/privacy-policy/" target="_blank">Privacy Policy</a>.</label>
564
  <input type="hidden" name="list" value="3pFQTnTsH763gAKTuvOGhPzA"/>
565
  <input type="submit" name="submit" id="wsm_submit" class="button button-primary" value="Subscribe" />
566
  </form>
50
 
51
  include_once( 'includes/wcm-class-stock.php' );
52
 
53
+ add_action( 'admin_notices', array( $this, 'includes' ) );
54
 
55
  add_action( 'admin_init', array( $this, 'generate_csv_file' ) );
56
 
83
  *
84
  * @since 1.0.0
85
  */
86
+ public function includes() {
87
  $is_wsm_admin = $this->is_wsm_admin_page();
88
  if ( $is_wsm_admin ) {
89
  $this->may_be_show_sa_in_app_offer();
186
  wp_set_script_translations( $this->plugin_slug . '-admin-script-react', 'stock-manager', STOCKDIR . 'languages' );
187
  }
188
 
189
+ // Klawoo subscribe.
190
+ $wsm_dismiss_admin_notice = get_option( 'wsm_dismiss_subscribe_admin_notice', false );
191
+ if ( empty( $wsm_dismiss_admin_notice ) ) {
192
+ $is_wsm_admin = $this->is_wsm_admin_page();
193
+ if ( $is_wsm_admin ) {
194
+ $params = array(
195
+ 'ajax_nonce' => wp_create_nonce( 'wsm_update' ),
196
+ );
197
+ wp_localize_script( $this->plugin_slug . '-admin-script-w', 'ajax_object', $params );
198
+ wp_enqueue_script( $this->plugin_slug . '-admin-script-w', plugins_url( 'assets/js/subscribe.js', __FILE__ ), array( 'jquery' ), Stock_Manager::VERSION );
199
+
200
+ }
201
  }
202
  }
203
 
494
 
495
  if ( empty( $wsm_dismiss_admin_notice ) ) {
496
  ?>
497
+ <style type="text/css" class="wsm-subscribe">
498
  #wsm_promo_msg {
499
  display: block !important;
500
  background-color: #f2f6fc;
 
501
  border-left-color: #5850ec;
502
  }
503
  #wsm_promo_msg table {
504
  width: 100%;
505
  padding-bottom: 0.25em;
506
  }
 
 
 
507
  #wsm_dashicon {
508
  padding: 0.5em;
509
+ width: 3%;
510
  }
511
  #wsm_promo_msg_content {
512
  padding: 0.5em;
513
  }
514
  #wsm_promo_msg .dashicons.dashicons-awards {
515
+ font-size: 5em;
516
  color: #b08d57;
517
  margin-left: -0.2em;
518
  margin-bottom: 0.65em;
519
  }
520
  .wsm_headline {
521
  padding: 0.5em 0;
522
+ font-size: 1.4em;
523
  }
524
  form.wsm_klawoo_subscribe {
525
  padding: 0.5em 0;
526
  margin-block-end: 0 !important;
527
+ font-size: 1.1em;
528
  }
529
  form.wsm_klawoo_subscribe #email {
530
  width: 14em;
538
  margin-right: 0.5em;
539
  }
540
  form.wsm_klawoo_subscribe #wsm_submit {
541
+ font-size: 1.3em;
542
  line-height: 0em;
543
  margin-top: 0;
544
  font-weight: bold;
546
  border-color: #5850ec;
547
  }
548
  .wsm_success {
549
+ font-size: 1.5em;
550
  font-weight: bold;
551
  }
552
  </style>
562
  <form name="wsm_klawoo_subscribe" class="wsm_klawoo_subscribe" action="#" method="POST" accept-charset="utf-8">
563
  <input type="email" class="regular-text ltr" name="email" id="email" placeholder="Your email address" required="required" />
564
  <input type="checkbox" name="wsm_gdpr_agree" id="wsm_gdpr_agree" value="1" required="required" />
565
+ <label for="wsm_gdpr_agree" class="wsm_gdpr_label">I have read and agreed to your <a href="https://www.storeapps.org/privacy-policy/?utm_source=wsm&utm_medium=in_app_subscribe&utm_campaign=in_app_subscribe" target="_blank">Privacy Policy</a>.</label>
566
  <input type="hidden" name="list" value="3pFQTnTsH763gAKTuvOGhPzA"/>
567
  <input type="submit" name="submit" id="wsm_submit" class="button button-primary" value="Subscribe" />
568
  </form>
languages/woocommerce-stock-manager.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the WooCommerce Stock Manager plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Stock Manager 2.5.6\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: 2021-03-26T16:27:43+05:30\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.1.0\n"
15
  "X-Domain: woocommerce-stock-manager\n"
@@ -70,7 +70,7 @@ msgid "Yes"
70
  msgstr ""
71
 
72
  #. translators: %1$s & %2$s: Opening & closing strong tag. %3$s: link to WooCommerce Stock Manager on WordPress.org
73
- #: admin/class-stock-manager-admin.php:587
74
  msgid "If you are liking %1$sWooCommerce Stock Manager%2$s, please rate us %3$s. A huge thanks from StoreApps in advance!"
75
  msgstr ""
76
 
2
  # This file is distributed under the same license as the WooCommerce Stock Manager plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Stock Manager 2.5.7\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: 2021-04-03T11:16:52+05:30\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.1.0\n"
15
  "X-Domain: woocommerce-stock-manager\n"
70
  msgstr ""
71
 
72
  #. translators: %1$s & %2$s: Opening & closing strong tag. %3$s: link to WooCommerce Stock Manager on WordPress.org
73
+ #: admin/class-stock-manager-admin.php:589
74
  msgid "If you are liking %1$sWooCommerce Stock Manager%2$s, please rate us %3$s. A huge thanks from StoreApps in advance!"
75
  msgstr ""
76
 
public/class-stock-manager.php CHANGED
@@ -17,7 +17,7 @@ class Stock_Manager {
17
  *
18
  * @var string
19
  */
20
- const VERSION = '2.5.6';
21
 
22
  /**
23
  * Plugin slug
17
  *
18
  * @var string
19
  */
20
+ const VERSION = '2.5.7';
21
 
22
  /**
23
  * Plugin slug
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: stock manager, woocommerce, stock management, inventory, products
7
  Requires at least: 5.0.0
8
  Tested up to: 5.7.0
9
  Requires PHP: 5.6
10
- Stable tag: 2.5.6
11
  License: GPLv3
12
 
13
  == Description ==
@@ -149,6 +149,11 @@ Be sure, that you have active stock manage.
149
 
150
  == Changelog ==
151
 
 
 
 
 
 
152
  = 2.5.6 (26.03.2021) =
153
  * Update: Admin footer text for WooCommerce Stock Manager pages
154
  * Update: Code Improvements
@@ -232,6 +237,9 @@ For the changelog of earlier versions, please refer to the separate [changelog.t
232
 
233
  == Upgrade Notice ==
234
 
 
 
 
235
  = 2.5.6 =
236
  Admin footer text for WooCommerce Stock Manager pages, Code Improvements, POT file. Recommended upgrade.
237
 
7
  Requires at least: 5.0.0
8
  Tested up to: 5.7.0
9
  Requires PHP: 5.6
10
+ Stable tag: 2.5.7
11
  License: GPLv3
12
 
13
  == Description ==
149
 
150
  == Changelog ==
151
 
152
+ = 2.5.7 (03.04.2021) =
153
+ * Fix: 'Cannot modify header information – headers already sent' in some cases
154
+ * Fix: jQuery error
155
+ * Update: POT file
156
+
157
  = 2.5.6 (26.03.2021) =
158
  * Update: Admin footer text for WooCommerce Stock Manager pages
159
  * Update: Code Improvements
237
 
238
  == Upgrade Notice ==
239
 
240
+ = 2.5.7 =
241
+ 'Cannot modify header information – headers already sent' in some cases, jQuery error, POT file. Recommended upgrade.
242
+
243
  = 2.5.6 =
244
  Admin footer text for WooCommerce Stock Manager pages, Code Improvements, POT file. Recommended upgrade.
245
 
woocommerce-stock-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Stock Manager
4
  * Plugin URI: https://www.storeapps.org/woocommerce-plugins/
5
  * Description: Manage product's stock and price in your WooCommerce store.
6
- * Version: 2.5.6
7
  * Author: StoreApps
8
  * Author URI: https://www.storeapps.org/
9
  * Requires at least: 5.0.0
@@ -25,7 +25,7 @@ if ( ! defined( 'WPINC' ) ) {
25
 
26
  define( 'STOCKDIR', plugin_dir_path( __FILE__ ) );
27
  define( 'STOCKURL', plugin_dir_url( __FILE__ ) );
28
- define( 'STOCKVERSION', '2.5.6' );
29
  if( !defined( 'WSM_PLUGIN_FILE' ) ) {
30
  define( 'WSM_PLUGIN_FILE', __FILE__ );
31
  }
3
  * Plugin Name: WooCommerce Stock Manager
4
  * Plugin URI: https://www.storeapps.org/woocommerce-plugins/
5
  * Description: Manage product's stock and price in your WooCommerce store.
6
+ * Version: 2.5.7
7
  * Author: StoreApps
8
  * Author URI: https://www.storeapps.org/
9
  * Requires at least: 5.0.0
25
 
26
  define( 'STOCKDIR', plugin_dir_path( __FILE__ ) );
27
  define( 'STOCKURL', plugin_dir_url( __FILE__ ) );
28
+ define( 'STOCKVERSION', '2.5.7' );
29
  if( !defined( 'WSM_PLUGIN_FILE' ) ) {
30
  define( 'WSM_PLUGIN_FILE', __FILE__ );
31
  }