Changeset 3434397
- Timestamp:
- 01/07/2026 01:42:20 PM (6 weeks ago)
- Location:
- woocommerce-stock-manager/trunk
- Files:
-
- 12 edited
-
admin/class-stock-manager-admin.php (modified) (5 diffs)
-
admin/includes/class-wsm-in-app-pricing.php (modified) (4 diffs)
-
admin/includes/class-wsm-save.php (modified) (7 diffs)
-
admin/includes/class-wsm-stock.php (modified) (4 diffs)
-
admin/views/admin.php (modified) (1 diff)
-
admin/views/import-export.php (modified) (3 diffs)
-
admin/views/log-history.php (modified) (1 diff)
-
languages/woocommerce-stock-manager.pot (modified) (4 diffs)
-
public/class-stock-manager.php (modified) (9 diffs)
-
readme.txt (modified) (4 diffs)
-
sa-includes/class-sa-wsm-in-app-offer.php (modified) (4 diffs)
-
woocommerce-stock-manager.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-stock-manager/trunk/admin/class-stock-manager-admin.php
r3395013 r3434397 135 135 ) 136 136 ), 137 function ( $carry, $item ) {137 function ( $carry, $item ) { 138 138 $carry[ $item->term_id ] = html_entity_decode( $item->name ); 139 139 return $carry; … … 152 152 ) 153 153 ), 154 function ( $carry, $item ) {154 function ( $carry, $item ) { 155 155 $carry[ $item->slug ] = $item->name; 156 156 return $carry; … … 281 281 add_action( 282 282 'load-' . $hook, 283 function () {283 function () { 284 284 add_filter( 285 285 'screen_options_show_screen', … … 463 463 464 464 return $wsm_rating_text; 465 466 465 } 467 466 … … 490 489 491 490 return $wsm_text; 492 493 491 } 494 492 -
woocommerce-stock-manager/trunk/admin/includes/class-wsm-in-app-pricing.php
r3395013 r3434397 4 4 * 5 5 * @package woocommerce-stock-manager/admin/includes/ 6 * @version 1. 1.06 * @version 1.2.0 7 7 */ 8 8 … … 36 36 */ 37 37 private function __construct() { 38 if ( ( empty( $_GET['page'] ) ) || ( 'stock-manager-pricing' !== sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) ) {// phpcs:ignore38 if ( ( empty( $_GET['page'] ) ) || ( 'stock-manager-pricing' !== sanitize_text_field( wp_unslash( $_GET['page'] ) ) ) ) {// phpcs:ignore 39 39 return; 40 40 } … … 46 46 * Display pricing page HTML. 47 47 */ 48 public function display_pricing_page() { ?> 48 public function display_pricing_page() { 49 ?> 49 50 <div id="wsm_in_app_pricing"> 50 51 <section class="mt-12 sm:mt-12 lg:mt-12"> … … 380 381 <td class="px-3 py-4 xl:px-6"> 381 382 <?php echo esc_html( _x( 'Manage Unattached Media', 'feature row', 'woocommerce-stock-manager' ) ); ?> 383 </td> 384 <td class="px-3 py-4 xl:px-6">—</td> 385 <td class="px-3 py-4 xl:px-6 text-green-500"> 386 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="3" stroke="currentColor" class="h-6 w-6 m-auto"> 387 <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"></path> 388 </svg> 389 </td> 390 </tr> 391 <tr> 392 <td class="px-3 py-4 xl:px-6"> 393 <?php echo esc_html( _x( 'WPML compatibility', 'feature row', 'woocommerce-stock-manager' ) ); ?> 382 394 </td> 383 395 <td class="px-3 py-4 xl:px-6">—</td> -
woocommerce-stock-manager/trunk/admin/includes/class-wsm-save.php
r2600329 r3434397 4 4 * 5 5 * @package woocommerce-stock-manager/admin/includes/ 6 * @version 2.8. 06 * @version 2.8.1 7 7 */ 8 8 … … 29 29 self::save_data( $values, $product_id ); 30 30 } 31 32 31 } 33 32 … … 35 34 * Prepare data 36 35 * 37 * @param array $data The column key to name map. 38 * @param string $item ID. 36 * @param array $data The column key to name map. 39 37 */ 40 public static function prepare_data( $data , $item) {38 public static function prepare_data( $data ) { 41 39 42 40 $values = array(); … … 53 51 54 52 return $values; 55 56 53 } 57 54 … … 76 73 77 74 return $values; 78 79 75 } 80 76 … … 130 126 } 131 127 132 /* // @codingStandardsIgnoreLine133 if( !empty( $data['regular_price'] ) ){134 $price = sanitize_text_field($data['regular_price']);135 if( !empty( $data['sales_price'] ) ){136 $sale_price = sanitize_text_field($data['sales_price']);137 wsm_save_price( $product_id, $price, $sale_price );138 }else{139 wsm_save_price( $product_id, $price );140 }141 }142 */143 128 if ( isset( $data['regular_price'] ) ) { 144 129 if ( ! empty( $data['regular_price'] ) ) { … … 164 149 165 150 } 166 167 151 } 168 169 152 }//end class -
woocommerce-stock-manager/trunk/admin/includes/class-wsm-stock.php
r2614600 r3434397 39 39 $this->limit = $limit; 40 40 } 41 42 41 } 43 42 … … 59 58 /** 60 59 * Return products 61 * 62 * @param array $data The products data. 63 */ 64 public function get_products( $data = array() ) { 60 */ 61 public function get_products() { 65 62 66 63 $get_sku = ( ! empty( $_GET['sku'] ) ) ? wc_clean( wp_unslash( $_GET['sku'] ) ) : ''; // phpcs:ignore … … 204 201 205 202 /** 206 * Save all meta data.207 *208 * @param array $data The column key to name map.209 */210 public function save_all( $data ) {211 $post = ( ! empty( $_POST ) ) ? wc_clean( wp_unslash( $_POST ) ) : array(); // phpcs:ignore212 foreach ( $data['product_id'] as $item ) {213 WSM_Save::save_one_item( $post, $item );214 }215 }216 217 /**218 203 * Save all meta data 219 204 * … … 320 305 321 306 return $the_query; 322 323 } 324 307 } 325 308 }//end class -
woocommerce-stock-manager/trunk/admin/views/admin.php
r3281541 r3434397 4 4 * 5 5 * @package woocommerce-stock-manager/admin/views 6 * @version 2. 7.06 * @version 2.8.0 7 7 */ 8 8 9 9 if ( ! defined( 'ABSPATH' ) ) { 10 10 exit; 11 }12 13 $stock = $this->stock();14 15 /**16 * Save all data.17 */18 $product_id = ( ! empty( $_POST['product_id'] ) ) ? wc_clean( wp_unslash( $_POST['product_id'] ) ) : 0; // phpcs:ignore19 $product = ( ! empty( $_POST ) ) ? wc_clean( wp_unslash( $_POST ) ) : array(); // phpcs:ignore20 if ( ! empty( $product_id ) ) {21 $stock->save_all( $product );22 // add redirect.23 }24 25 /**26 * Save display option.27 */28 $page_filter_display = ( ! empty( $_POST['page-filter-display'] ) ) ? wc_clean( wp_unslash( $_POST['page-filter-display'] ) ) : ''; // phpcs:ignore29 if ( ! empty( $page_filter_display ) ) {30 $stock->save_filter_display( $product );31 11 } 32 12 -
woocommerce-stock-manager/trunk/admin/views/import-export.php
r3281541 r3434397 4 4 * 5 5 * @package woocommerce-stock-manager/admin/views/ 6 * @version 3.1. 06 * @version 3.1.1 7 7 */ 8 8 … … 182 182 183 183 /* translators: 1: Uploaded file name */ 184 echo sprintf( esc_html__( 'The file %1$s has been uploaded', 'woocommerce-stock-manager' ), basename( $uploaded_file ) ); // phpcs:ignore184 printf( esc_html__( 'The file %1$s has been uploaded', 'woocommerce-stock-manager' ), basename( $uploaded_file ) ); // phpcs:ignore 185 185 186 186 $row = 1; … … 212 212 213 213 /* translators: 1: P tag opening 2: Updated Product ID 3. Closing p tag */ 214 echo sprintf( esc_html__( '%1$s Product with ID %2$s was updated. %3$s', 'woocommerce-stock-manager' ), '<p>', wp_kses_post( $product_id ), '</p>' );214 printf( esc_html__( '%1$s Product with ID %2$s was updated. %3$s', 'woocommerce-stock-manager' ), '<p>', wp_kses_post( $product_id ), '</p>' ); 215 215 } 216 216 } 217 $row++;217 ++$row; 218 218 219 219 } -
woocommerce-stock-manager/trunk/admin/views/log-history.php
r2600329 r3434397 33 33 <?php 34 34 $data = $wpdb->get_results( // phpcs:ignore 35 $wpdb->prepare( // phpcs:ignore36 "SELECT *35 $wpdb->prepare( // phpcs:ignore 36 "SELECT * 37 37 FROM {$wpdb->prefix}stock_log 38 38 WHERE product_id = %d", 39 $product_id40 )39 $product_id 40 ) 41 41 ); 42 42 -
woocommerce-stock-manager/trunk/languages/woocommerce-stock-manager.pot
r3395013 r3434397 1 # Copyright (C) 202 5StoreApps1 # Copyright (C) 2026 StoreApps 2 2 # This file is distributed under the GNU General Public License v2.0. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Stock Manager for WooCommerce 3. 5.0\n"5 "Project-Id-Version: Stock Manager for WooCommerce 3.6.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-stock-manager\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 5-11-13T06:15:50+00:00\n"12 "POT-Creation-Date: 2026-01-07T07:37:48+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" … … 111 111 112 112 #. translators: %s: discount string. 113 #: admin/class-stock-manager-admin.php:58 3113 #: admin/class-stock-manager-admin.php:585 114 114 msgctxt "upgrade notice" 115 115 msgid "Our best-seller Smart Manager Pro – up to <strong style=\"font-size:1.75rem;\">%s</strong>" … … 117 117 118 118 #. translators: %s: pricing page link. 119 #: admin/class-stock-manager-admin.php:59 4119 #: admin/class-stock-manager-admin.php:596 120 120 msgctxt "upgrade notice" 121 121 msgid "Get <strong>all Stock Manager features + Bulk Edit</strong> + more. %s." 122 122 msgstr "" 123 123 124 #: admin/class-stock-manager-admin.php:59 6124 #: admin/class-stock-manager-admin.php:598 125 125 msgctxt "upgrade notice" 126 126 msgid "Click here" -
woocommerce-stock-manager/trunk/public/class-stock-manager.php
r3395013 r3434397 113 113 self::single_activate(); 114 114 } 115 116 115 } 117 116 … … 148 147 self::single_deactivate(); 149 148 } 150 151 149 } 152 150 … … 165 163 self::single_activate(); 166 164 restore_current_blog(); 167 168 165 } 169 166 … … 193 190 194 191 return $result; 195 196 192 } 197 193 … … 200 196 */ 201 197 private static function single_activate() { 202 203 198 } 204 199 … … 207 202 */ 208 203 private static function single_deactivate() { 209 210 204 } 211 205 … … 249 243 "; 250 244 dbDelta( $table ); 251 252 245 } 253 246 … … 277 270 ) 278 271 ); 279 280 272 } 281 273 … … 383 375 } 384 376 } 385 386 377 }//end class 387 378 Stock_Manager::get_instance(); -
woocommerce-stock-manager/trunk/readme.txt
r3423123 r3434397 5 5 Plugin URI: https://www.storeapps.org/woocommerce-plugins/?utm_source=wprepo&utm_medium=web&utm_campaign=wsm_readme 6 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 .08 Tested up to: 6. 89 Requires PHP: 5.610 Stable tag: 3. 5.07 Requires at least: 5.0 8 Tested up to: 6.9 9 Requires PHP: 7.0 10 Stable tag: 3.6.0 11 11 License: GPLv2 12 12 … … 72 72 73 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 >You can also [sync stock log data](https://www.storeapps.org/docs/sm-how-to-sync-woocommerce-products-stock-log-from-stock-manager-for-woocommerce-to-smart-manager/?utm_source=wprepo&utm_medium=links&utm_campaign=stock_management_how_tos) from Stock Manager plugin into Smart Manager and bulk edit stock data. 74 75 75 76 **Spread The Love** … … 156 157 == Changelog == 157 158 159 = 3.6.0 (07.01.2026) = 160 * New: WordPress 6.9 compatible 161 * New: WooCommerce 10.4.3 compatible 162 * Fix: Strengthen security for Cross Site Request Forgery (CSRF) vulnerability [Thanks to Patchstack team] 163 * Update: POT file 164 158 165 = 3.5.0 (13.11.2025) = 159 166 * New: WordPress 6.8.3 compatible … … 348 355 == Upgrade Notice == 349 356 357 = 3.6.0 = 358 WordPress 6.9 compatible, WooCommerce 10.4.3 compatible, Fixes related to Strengthen security for Cross Site Request Forgery (CSRF) vulnerability [Thanks to Patchstack team]. Recommended upgrade. 359 350 360 = 3.5.0 = 351 361 WordPress 6.8.3 compatible, WooCommerce 10.3.5 compatible. Recommended upgrade. -
woocommerce-stock-manager/trunk/sa-includes/class-sa-wsm-in-app-offer.php
r3395013 r3434397 99 99 add_action( 'admin_notices', array( $this, 'in_app_offer' ) ); 100 100 add_action( 'wp_ajax_' . $this->prefix . '_dismiss_action', array( $this, 'dismiss_action' ) ); 101 102 101 } 103 102 … … 137 136 138 137 return false; 139 140 138 } 141 139 … … 173 171 174 172 } 175 176 173 } 177 174 … … 244 241 245 242 wp_send_json( array( 'success' => 'yes' ) ); 246 247 } 248 243 } 249 244 } -
woocommerce-stock-manager/trunk/woocommerce-stock-manager.php
r3395013 r3434397 4 4 * Plugin URI: https://www.storeapps.org/woocommerce-plugins/ 5 5 * Description: Manage product's stock and price in your WooCommerce store. Export/Import inventory, track history, sort and more... 6 * Version: 3. 5.06 * Version: 3.6.0 7 7 * Author: StoreApps 8 8 * Author URI: https://www.storeapps.org/ 9 9 * Developer: StoreApps 10 10 * Developer URI: https://www.storeapps.org/ 11 * Requires at least: 5.0 .012 * Tested up to: 6. 813 * Requires PHP: 5.6+11 * Requires at least: 5.0 12 * Tested up to: 6.9 13 * Requires PHP: 7.0 14 14 * WC requires at least: 3.5.0 15 * WC tested up to: 10. 3.515 * WC tested up to: 10.4.3 16 16 * Requires Plugins: woocommerce 17 17 * Text Domain: woocommerce-stock-manager … … 19 19 * License: GNU General Public License v2.0 20 20 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 21 * Copyright (c) 2020-202 5StoreApps. All rights reserved.21 * Copyright (c) 2020-2026 StoreApps. All rights reserved. 22 22 * 23 23 * @package woocommerce-stock-manager … … 65 65 * Function to check if minimum WP & WC is satisfied before updating the plugin 66 66 * Shown on plugins page 67 * 68 * @param array $plugin_data Details about current plugin version + new update with plugin assets. 69 * @param object $r Details about new plugin version with plugin assets. 70 */ 71 function stockmanager_update_message_cb( $plugin_data, $r ) { 67 */ 68 function stockmanager_update_message_cb() { 72 69 if ( version_compare( WSM_PLUGIN_VERSION, '2.0.0', '<' ) ) { 73 70 ?> … … 185 182 $data[ $index ]['parent_id'] = ''; 186 183 187 $i++;184 ++$i; 188 185 189 186 if ( 'variable' === $product_type ) { … … 213 210 if ( false === $tag ) { 214 211 $product_name .= $v . ' '; 212 } elseif ( is_array( $tag ) ) { 213 $product_name .= $tag['name'] . ' '; 215 214 } else { 216 if ( is_array( $tag ) ) { 217 $product_name .= $tag['name'] . ' '; 218 } else { 219 $product_name .= $tag->name . ' '; 220 } 215 $product_name .= $tag->name . ' '; 221 216 } 222 217 } … … 254 249 $data[ $vindex ]['parent_id'] = $item->ID; 255 250 256 $i++;251 ++$i; 257 252 } 258 253 } … … 274 269 exit(); 275 270 } 276 277 271 } 278 272 … … 308 302 309 303 exit(); 310 311 304 } 312 305 … … 339 332 if ( 'POST' === $method ) { 340 333 $options['body'] = $qs; 334 } elseif ( strpos( $url, '?' ) !== false ) { 335 $url .= '&' . $qs; 341 336 } else { 342 if ( strpos( $url, '?' ) !== false ) { 343 $url .= '&' . $qs; 344 } else { 345 $url .= '?' . $qs; 346 } 337 $url .= '?' . $qs; 347 338 } 348 339
Note: See TracChangeset
for help on using the changeset viewer.