Changeset 2545014
- Timestamp:
- 06/09/2021 12:15:32 PM (4 years ago)
- Location:
- woo-min-max-quantity-limit
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
woo-min-max-quantity-limit/tags/2.1.8/changelog.txt
r2544781 r2545014 1 1 *** WC Minimum & Maximum Quantity Changelog *** 2 2021.06.09 - version 2.1.8 3 * Bug Fix: Division by zero error fix 2 4 2021.06.09 - version 2.1.7 3 5 * Bug Fix: To set the default increment by value @tigerrockmartialarts -
woo-min-max-quantity-limit/tags/2.1.8/readme.txt
r2544781 r2545014 6 6 Tested up to: 5.7.2 7 7 Stable tag: 2.1.7 8 WC tested up to: 5. 3.08 WC tested up to: 5.4.0 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 44 44 45 45 == Changelog == 46 = 2.1.8 = 47 Bug Fix: Bug fix for division or modulo by zero 46 48 = 2.1.7 = 47 49 Bug Fix: To set the default increment by value @tigerrockmartialarts -
woo-min-max-quantity-limit/tags/2.1.8/woo-min-max-quantity.php
r2544781 r2545014 4 4 Plugin URI: http://ashokg.in/ 5 5 Description: Allow the site admin to enable the feature of minimum and maximum purchase of a particular product in each product. 6 Version: 2.1. 76 Version: 2.1.8 7 7 Author: Ashok G 8 8 Text Domain: wcmmax 9 9 Author URI: https://ashokg.in 10 WC tested up to: 5. 3.010 WC tested up to: 5.4.0 11 11 Copyright: © 201 Ashok G. 12 12 License: GNU General Public License v3.0 … … 118 118 $maxQty = get_post_meta($prodid, '_wc_mmax_max', true); 119 119 $incrementbyQty = get_post_meta($prodid, '_wc_mmax_increment', true); 120 $incrementbyQty = $incrementbyQty ? $incrementbyQty : 1; 120 121 if ($minQty > 0 && $maxQty > 0 && $mmaxEnable == 1) { 121 122 $args['min_value'] = $minQty; // Starting value … … 131 132 132 133 function wc_mmax_custom_add_to_cart($args, $product) { 133 $orderQTY = $_POST['quantity'];134 $orderQTY = isset($_POST['quantity']) ? $_POST['quantity'] : 1; 134 135 $mmaxEnable = get_post_meta($product, '_wc_mmax_prd_opt_enable', true); 135 136 $minQty = get_post_meta($product, '_wc_mmax_min', true); … … 145 146 if ($maxQty < $cartQty && $mmaxEnable == 1) { 146 147 147 wc_add_notice($maxQTYMsg . $orderQTY+$cartQty, 'error');148 wc_add_notice($maxQTYMsg, 'error'); 148 149 exit(wp_redirect(get_permalink($product))); 149 150 } … … 215 216 $mmaxEnable = get_post_meta($ci['product_id'], '_wc_mmax_prd_opt_enable', true); 216 217 $incrementbyQty = get_post_meta($ci['product_id'], '_wc_mmax_increment', true); 218 $incrementbyQty = $incrementbyQty ? $incrementbyQty : 1; 217 219 $factory = new WC_Product_Factory(); 218 220 $product = $factory->get_product($ci['product_id']); -
woo-min-max-quantity-limit/trunk/changelog.txt
r2544781 r2545014 1 1 *** WC Minimum & Maximum Quantity Changelog *** 2 2021.06.09 - version 2.1.8 3 * Bug Fix: Division by zero error fix 2 4 2021.06.09 - version 2.1.7 3 5 * Bug Fix: To set the default increment by value @tigerrockmartialarts -
woo-min-max-quantity-limit/trunk/readme.txt
r2544781 r2545014 6 6 Tested up to: 5.7.2 7 7 Stable tag: 2.1.7 8 WC tested up to: 5. 3.08 WC tested up to: 5.4.0 9 9 License: GNU General Public License v3.0 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 44 44 45 45 == Changelog == 46 = 2.1.8 = 47 Bug Fix: Bug fix for division or modulo by zero 46 48 = 2.1.7 = 47 49 Bug Fix: To set the default increment by value @tigerrockmartialarts -
woo-min-max-quantity-limit/trunk/woo-min-max-quantity.php
r2544781 r2545014 4 4 Plugin URI: http://ashokg.in/ 5 5 Description: Allow the site admin to enable the feature of minimum and maximum purchase of a particular product in each product. 6 Version: 2.1. 76 Version: 2.1.8 7 7 Author: Ashok G 8 8 Text Domain: wcmmax 9 9 Author URI: https://ashokg.in 10 WC tested up to: 5. 3.010 WC tested up to: 5.4.0 11 11 Copyright: © 201 Ashok G. 12 12 License: GNU General Public License v3.0 … … 118 118 $maxQty = get_post_meta($prodid, '_wc_mmax_max', true); 119 119 $incrementbyQty = get_post_meta($prodid, '_wc_mmax_increment', true); 120 $incrementbyQty = $incrementbyQty ? $incrementbyQty : 1; 120 121 if ($minQty > 0 && $maxQty > 0 && $mmaxEnable == 1) { 121 122 $args['min_value'] = $minQty; // Starting value … … 131 132 132 133 function wc_mmax_custom_add_to_cart($args, $product) { 133 $orderQTY = $_POST['quantity'];134 $orderQTY = isset($_POST['quantity']) ? $_POST['quantity'] : 1; 134 135 $mmaxEnable = get_post_meta($product, '_wc_mmax_prd_opt_enable', true); 135 136 $minQty = get_post_meta($product, '_wc_mmax_min', true); … … 145 146 if ($maxQty < $cartQty && $mmaxEnable == 1) { 146 147 147 wc_add_notice($maxQTYMsg . $orderQTY+$cartQty, 'error');148 wc_add_notice($maxQTYMsg, 'error'); 148 149 exit(wp_redirect(get_permalink($product))); 149 150 } … … 215 216 $mmaxEnable = get_post_meta($ci['product_id'], '_wc_mmax_prd_opt_enable', true); 216 217 $incrementbyQty = get_post_meta($ci['product_id'], '_wc_mmax_increment', true); 218 $incrementbyQty = $incrementbyQty ? $incrementbyQty : 1; 217 219 $factory = new WC_Product_Factory(); 218 220 $product = $factory->get_product($ci['product_id']);
Note: See TracChangeset
for help on using the changeset viewer.