Plugin Directory

Changeset 2691185


Ignore:
Timestamp:
03/09/2022 03:46:51 AM (4 years ago)
Author:
unikforce
Message:

2.4 version updated

Location:
woo-min-max-quantity-step-control-single
Files:
37 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • woo-min-max-quantity-step-control-single/trunk/includes/set_max_min_quantity.php

    r2683676 r2691185  
    475475 */
    476476function wcmmq_s_set_min_for_single( $quantity, $product ){
    477     $min_quantity = get_post_meta( $product->get_id(), WC_MMQ_PREFIX . 's_min_quantity', true);
    478     $min_quantity = !empty( $min_quantity ) ? $min_quantity : WC_MMQ::getOption( WC_MMQ_PREFIX . 's_min_quantity' ); //Regenerate from Default
     477    $min_quantity = get_post_meta( $product->get_id(), WC_MMQ_PREFIX . 'min_quantity', true);
     478    $min_quantity = !empty( $min_quantity ) ? $min_quantity : WC_MMQ::getOption( WC_MMQ_PREFIX . 'min_quantity' ); //Regenerate from Default
    479479    if( !$product->is_sold_individually() && ( !empty( $min_quantity ) || !$min_quantity ) && is_numeric($min_quantity) ){
    480480       return $min_quantity;
     
    496496    return 0.01;
    497497}
    498 add_filter('woocommerce_quantity_input_step','wcmmq_step_set_for_order_status_update',888,1);
     498//add_filter('woocommerce_quantity_input_step','wcmmq_step_set_for_order_status_update',888,1);
     499
     500function wcmmq_step_set_step_quantity($quantity, $product){
     501    $product_step = get_post_meta( $product->get_id(), WC_MMQ_PREFIX . 'product_step', true);
     502    $product_step = !empty( $product_step ) ? $product_step : WC_MMQ::getOption( WC_MMQ_PREFIX . 'product_step' ); //Regenerate from Default
     503    if( !$product->is_sold_individually() && ( !empty( $product_step ) || !$product_step ) && is_numeric($product_step) ){
     504        return $product_step;
     505    }
     506    return 1;
     507}
     508add_filter('woocommerce_quantity_input_step','wcmmq_step_set_step_quantity', 10, 2);
    499509
    500510/**
  • woo-min-max-quantity-step-control-single/trunk/readme.txt

    r2683774 r2691185  
    66Tested up to: 5.9
    77Requires PHP: 5.6
    8 Stable tag: 2.3
     8Stable tag: 2.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8787== Changelog ==
    8888
     89= 2.4 =
     90* Fixed: min quantity on mini cart and other plugins
     91* Fixed: step quantity on mini cart and other plugins
     92* Bug Fixed
     93
    8994= 2.3 =
    9095* Fixed: min quantity should message error fixed.
  • woo-min-max-quantity-step-control-single/trunk/wcmmq.php

    r2683676 r2691185  
    22/**
    33 * Plugin Name: Min Max Quantity & Step Control for WooCommerce
    4  * Plugin URI: https://min-max-quantity.codeastrology.com/
     4 * Plugin URI: https://codeastrology.com/min-max-quantity/
    55 * Description: Min Max Quantity & Step Control plugin offers to display specific products with minimum, maximum quantity. As well as by this plugin you will be able to set the increment or decrement step as much as you want. In a word: Minimum Quantity, Maximum Quantity and Step can be controlled. for any issue: codersaiful@gmail.com
    66 * Author: CodeAstrology
     
    88 * Tags: WooCommerce, minimum quantity, maximum quantity, woocommrce quantity, customize woocommerce quantity, customize wc quantity, wc qt, max qt, min qt, maximum qt, minimum qt
    99 *
    10  * Version: 2.3
     10 * Version: 2.4
    1111 * Requires at least:    4.0.0
    1212 * Tested up to:         5.9.1
     
    2727
    2828define('WC_MMQ__FILE__', __FILE__);
    29 define('WC_MMQ_VERSION', '2.3.0');
     29define('WC_MMQ_VERSION', '2.4.1');
    3030define('WC_MMQ_PATH', plugin_dir_path(WC_MMQ__FILE__));
    3131define('WC_MMQ_URL', plugins_url(DIRECTORY_SEPARATOR, WC_MMQ__FILE__));
Note: See TracChangeset for help on using the changeset viewer.