Changeset 3286755
- Timestamp:
- 05/03/2025 12:17:01 PM (11 months ago)
- Location:
- minmax-quantities-for-woocommerce
- Files:
-
- 43 added
- 3 edited
-
tags/1.6.0 (added)
-
tags/1.6.0/LICENSE.txt (added)
-
tags/1.6.0/README.txt (added)
-
tags/1.6.0/assets (added)
-
tags/1.6.0/assets/admin (added)
-
tags/1.6.0/assets/admin/css (added)
-
tags/1.6.0/assets/admin/css/woo-minmax-quantities-admin.css (added)
-
tags/1.6.0/assets/admin/js (added)
-
tags/1.6.0/assets/admin/js/woo-minmax-quantities-admin.js (added)
-
tags/1.6.0/assets/public (added)
-
tags/1.6.0/assets/public/css (added)
-
tags/1.6.0/assets/public/css/woo-minmax-quantities-public.css (added)
-
tags/1.6.0/assets/public/js (added)
-
tags/1.6.0/assets/public/js/woo-minmax-quantities-public.js (added)
-
tags/1.6.0/includes (added)
-
tags/1.6.0/includes/Activator.php (added)
-
tags/1.6.0/includes/Admin (added)
-
tags/1.6.0/includes/Admin/Admin.php (added)
-
tags/1.6.0/includes/Admin/Settings.php (added)
-
tags/1.6.0/includes/Assets.php (added)
-
tags/1.6.0/includes/Clients (added)
-
tags/1.6.0/includes/Clients/Clients.php (added)
-
tags/1.6.0/includes/Deactivator.php (added)
-
tags/1.6.0/includes/I18n.php (added)
-
tags/1.6.0/includes/Init.php (added)
-
tags/1.6.0/index.php (added)
-
tags/1.6.0/languages (added)
-
tags/1.6.0/languages/woo-minmax-quantities.pot (added)
-
tags/1.6.0/minmax-quantities-for-woocommerce.php (added)
-
tags/1.6.0/uninstall.php (added)
-
tags/1.6.0/vendor (added)
-
tags/1.6.0/vendor/autoload.php (added)
-
tags/1.6.0/vendor/composer (added)
-
tags/1.6.0/vendor/composer/ClassLoader.php (added)
-
tags/1.6.0/vendor/composer/InstalledVersions.php (added)
-
tags/1.6.0/vendor/composer/LICENSE (added)
-
tags/1.6.0/vendor/composer/autoload_classmap.php (added)
-
tags/1.6.0/vendor/composer/autoload_namespaces.php (added)
-
tags/1.6.0/vendor/composer/autoload_psr4.php (added)
-
tags/1.6.0/vendor/composer/autoload_real.php (added)
-
tags/1.6.0/vendor/composer/autoload_static.php (added)
-
tags/1.6.0/vendor/composer/installed.json (added)
-
tags/1.6.0/vendor/composer/installed.php (added)
-
trunk/README.txt (modified) (4 diffs)
-
trunk/includes/Clients/Clients.php (modified) (2 diffs)
-
trunk/minmax-quantities-for-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
minmax-quantities-for-woocommerce/trunk/README.txt
r3190138 r3286755 3 3 Tags: woocommrce quantity, product quantity, quantity, minimum quantity, maximum quantity 4 4 Requires at least: 3.0.1 5 Tested up to: 6. 76 Stable tag: 1. 5.05 Tested up to: 6.8.1 6 Stable tag: 1.6.0 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 14 14 MinMax Quantities for WooCommerce help you to restrict minimum and maximum quantity for product. You can set the restriction globally, as well as individual product including variations. You can also set amount and quantity limits for cart and order. 15 15 16 👉 [ Variations as Single ProductFeature](https://storeplugin.net/plugins/minmax-quantities-for-woocommerce/?utm_source=wporg&utm_campaign=minmax&utm_medium=link) | [Support](https://storeplugin.net/contact-us/) | [Purchase Pro](https://storeplugin.net/plugins/minmax-quantities-for-woocommerce/?utm_source=wporg&utm_campaign=minmax&utm_medium=link)16 👉 [Min Max Quantity Feature](https://storeplugin.net/plugins/minmax-quantities-for-woocommerce/?utm_source=wporg&utm_campaign=minmax&utm_medium=link) | [Support](https://storeplugin.net/contact-us/) | [Purchase Pro](https://storeplugin.net/plugins/minmax-quantities-for-woocommerce/?utm_source=wporg&utm_campaign=minmax&utm_medium=link) 17 17 18 18 == Key features: == … … 45 45 * [Advanced Custom Order Status for WooCommerce](https://wordpress.org/plugins/advanced-custom-order-status-for-woocommerce/) - Create, edit, delete or add new custom order statuses and trigger the custom emails when order status changes 46 46 * [Product Search for WooCommerce](https://wordpress.org/plugins/product-search-for-woocommerce/) - Search products by SKU, title, category, attributes, tags, and custom taxonomies. 47 * [ ShopElement](https://wordpress.org/plugins/shopelement/) - Elementor Addon for WooCommerce47 * [WooCommerce Product Table Builder](https://wordpress.org/plugins/product-table-builder-lite/) - Create product table with Drag-and-Drop Table Builder, filter, sorting, pagination and more. 48 48 49 49 == Screenshots == … … 57 57 58 58 == Changelog == 59 = 1.6.0 = 60 * Fix: Minimum, Maximum quantity for cart 61 * Fix: step control for cart 62 * Other: Compatible with WordPress 6.8.1 63 * Other: Compatible with WooCommerce 9.8.3 64 59 65 = 1.5.0 = 60 66 * Update: WooCommerce HPOS compatibility -
minmax-quantities-for-woocommerce/trunk/includes/Clients/Clients.php
r3012806 r3286755 31 31 \add_action( 'woocommerce_check_cart_items', [ $this, 'wc_check_cart_items' ], 10, 1 ); 32 32 \add_filter( 'gettext_woocommerce', [ $this, 'checkout_error_messege' ] ); 33 34 // Block api compatible hooks 35 \add_filter( 'woocommerce_store_api_product_quantity_maximum', array( $this, 'wc_qty_maximum' ), 10, 2 ); 36 \add_filter( 'woocommerce_store_api_product_quantity_minimum', array( $this, 'wc_qty_minimum' ), 10, 2 ); 37 \add_filter( 'woocommerce_store_api_product_quantity_multiple_of', array( $this, 'wc_qty_multiple_of' ), 10, 2 ); 33 38 } 34 39 … … 173 178 174 179 /** 180 * Updating quantity max input value on the cart page 181 * 182 * @param int $maximum The max range of the input field. 183 * @param \WC_Product $product The cart products. 184 * 185 * @return int 186 */ 187 public function wc_qty_maximum( $maximum, $product ) { 188 $quantity_meta = $this->product_quantity( $product ); 189 if ( ! empty( $quantity_meta ) ) { 190 if ( isset( $quantity_meta['max_item'] ) && $quantity_meta['max_item'] > 1 ) { 191 $maximum = $quantity_meta['max_item']; 192 } 193 } 194 195 return $maximum; 196 } 197 198 /** 199 * Updating quantity min input value on the cart page 200 * 201 * @param int $minimum The min range of the input field. 202 * @param \WC_Product $product The cart products. 203 * 204 * @return int 205 */ 206 public function wc_qty_minimum( $minimum, $product ) { 207 $quantity_meta = $this->product_quantity( $product ); 208 if ( ! empty( $quantity_meta ) ) { 209 if ( isset( $quantity_meta['min_item'] ) && $quantity_meta['min_item'] > 1 ) { 210 $minimum = $quantity_meta['min_item']; 211 } 212 } 213 214 return $minimum; 215 } 216 217 /** 218 * Updating quantity step input value on the cart page 219 * 220 * @param int $multiple_of The step range of the input field. 221 * @param \WC_Product $product The cart products. 222 * 223 * @return int 224 */ 225 public function wc_qty_multiple_of( $multiple_of, $product ) { 226 $quantity_meta = $this->product_quantity( $product ); 227 if ( ! empty( $quantity_meta ) ) { 228 if ( isset( $quantity_meta['step_item'] ) && $quantity_meta['step_item'] > 1 ) { 229 $multiple_of = $quantity_meta['step_item']; 230 } 231 } 232 233 return $multiple_of; 234 } 235 236 /** 175 237 * Updating quantity values on frontend html input min max step values 176 238 * -
minmax-quantities-for-woocommerce/trunk/minmax-quantities-for-woocommerce.php
r3107159 r3286755 6 6 * Plugin URI: https://storeplugin.net 7 7 * Description: MinMax Quantities for WooCommerce plugin lets you set minimum and maximum quantities for items, orders, and amounts of the products in your store. 8 * Version: 1. 5.08 * Version: 1.6.0 9 9 * Author: StorePlugin 10 10 * Author URI: https://storeplugin.net/plugins/minmax-quantities-for-woocommerce … … 28 28 * Currently plugin version. 29 29 */ 30 define( 'WOO_MINMAX_QUANTITIES_VERSION', '1. 5.0' );30 define( 'WOO_MINMAX_QUANTITIES_VERSION', '1.6.0' ); 31 31 32 32 /**
Note: See TracChangeset
for help on using the changeset viewer.