Changeset 3451158
- Timestamp:
- 01/31/2026 08:38:00 PM (3 weeks ago)
- Location:
- visible-stock-threshold-for-woocommerce/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
visible-stock-threshold-for-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
visible-stock-threshold-for-woocommerce/trunk/readme.txt
r3399914 r3451158 4 4 Tags: woocommerce, threshold, out of stock, availability, role based 5 5 Requires at least: 5.8 6 Tested up to: 6. 86 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 1. 0.08 Stable tag: 1.1.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 69 69 == Changelog == 70 70 71 = 1.1.0 = 72 * Fix: If no threshold set for new products, QTY shown is wrong and no limit on purchasable quantity. 73 71 74 = 1.0.0 = 72 75 * Initial public release: visible stock cap, Strict Mode, per-product/category/role/global, server validations, i18n. … … 74 77 == Upgrade Notice == 75 78 79 = 1.1.0 = 80 * Fix: If no threshold set for new products, QTY shown is wrong and no limit on purchasable quantity. 81 76 82 = 1.0.0 = 77 83 First release. -
visible-stock-threshold-for-woocommerce/trunk/visible-stock-threshold-for-woocommerce.php
r3399914 r3451158 3 3 * Plugin Name: Visible Stock Threshold for WooCommerce 4 4 * Description: Show a capped "visible stock" and limit purchase quantity using global / category / role / per-product thresholds. Strict Mode can mark stock ≤ threshold as Out of Stock. Includes customizable "Only {qty} left" message. 5 * Version: 1. 0.05 * Version: 1.1.0 6 6 * Author: Modulux 7 7 * Author URI: https://modulux.net … … 366 366 367 367 // 1) Per product 368 $p = (int) $product->get_meta(self::META_KEY, true); 368 /*$p = (int) $product->get_meta(self::META_KEY, true); 369 369 370 if ($p > 0 || $p === 0 && $product->meta_exists(self::META_KEY)) { 370 371 return (int) apply_filters('modulux_vst_resolved_threshold', $p, $product); 371 } 372 }*/ 373 $meta_val = $product->get_meta(self::META_KEY, true); 374 if ($meta_val !== '' && $meta_val !== null) { 375 $p = (int) $meta_val; 376 if ($p > 0) { 377 return (int) apply_filters('modulux_vst_resolved_threshold', $p, $product); 378 } 379 } 372 380 373 381 // 2) Role override
Note: See TracChangeset
for help on using the changeset viewer.