Plugin Directory

Changeset 2674012


Ignore:
Timestamp:
02/07/2022 07:27:47 AM (4 years ago)
Author:
unikforce
Message:

version update

Location:
wc-quantity-plus-minus-button
Files:
24 added
5 edited

Legend:

Unmodified
Added
Removed
  • wc-quantity-plus-minus-button/trunk/assets/js/scripts.js

    r2588983 r2674012  
    3232            if ($(this).is(".plus")) {
    3333                if (val === max){
    34                     console.log(555);
    3534                    return false;
    3635                }
    3736                   
    3837                if (isNaN(val)) {
    39                     console.log(666);
    4038                    qty.val(step);
    4139                    return false;
    4240                }
    4341                if (val + step > max) {
    44                     qtyObj.attr('data-last_step', ( max-val ) );
     42                    qtyObj.attr('data-last_step', ( max-val < 0 ? 1 : max-val ) );
    4543                    qtyObj.attr('data-prev_step', ( step ) );
    4644                    qtyObj.find(".input-text").removeAttr('step' );
    4745                    qty.val(max);
    4846                } else {
    49                     console.log(888);
    5047                    qty.val(val + step);
    5148                }
     
    6158                }
    6259                if (val === min){
    63                     console.log(1111);
    6460                    return false;
    6561                }
    6662                   
    6763                if (isNaN(val)) {
    68                     console.log(2222);
    6964                    qty.val(min);
    7065                    return false;
    7166                }
    7267                if (val - step < min) {
    73                     console.log(3333);
    7468                    qty.val(min);
    7569                } else {
    76                     console.log(4444);
    7770                    qty.val(val - step);
    7871                }
  • wc-quantity-plus-minus-button/trunk/includes/functions.php

    r2622441 r2674012  
    99     */
    1010    function wqpmb_locate_template( $template, $template_name, $template_path ){
    11 
    12         if( $template_name !== 'global/quantity-input.php' ){
    13             return $template;
    14         }
    15        
    16        
    1711        $option_key = WQPMB_Button::$option['option'];
    1812        $datas = get_option( $option_key, false );
     
    109103            return ' ultraaddons ' . WQPMB_MENU_SLUG . ' ';
    110104        }
    111         return '';
     105        return;
    112106    }
    113107    add_filter( 'admin_body_class', 'wqpmb_admin_body_class' );
     
    166160}
    167161
     162if( !function_exists( 'wqpmb_button_off_in_minicart' ) ){
     163   
     164    /**
     165     * Disable our qty button from other place where global $product is not available
     166     *
     167     * @param bool $bool
     168     * @return bool
     169     */
     170    function wqpmb_button_off_in_minicart( $bool ){
     171        global $product;
     172        if(is_null($product)) return false;
     173        return $bool;
     174    }
     175    //add_filter( 'wqpmb_template_on_off', 'wqpmb_button_off_in_minicart' ); //currently disable
     176}
     177
    168178if( !function_exists( 'wqpmb_header_css' ) ){
    169179    /**
  • wc-quantity-plus-minus-button/trunk/init.php

    r2673625 r2674012  
    1010 * Domain Path: /languages/
    1111 *
    12  * Version: 1.0.9
     12 * Version: 1.1.0
    1313 * Requires at least:    4.0.0
    1414 * Tested up to:         5.9
    1515 * WC requires at least: 3.7
    16  * WC tested up to:      5.6.0
     16 * WC tested up to:      6.1.1
    1717 */
    18 if ( !defined( 'ABSPATH' ) ) {
     18if ( ! defined( 'ABSPATH' ) ) {
    1919    die();
    2020}
    2121
    22 if ( !defined( 'UltraAddons' ) ) {
     22if ( ! defined( 'UltraAddons' ) ) {
    2323    define( 'UltraAddons', __( 'UltraAddons', 'wqpmb' ));
    2424}
    2525
    2626if ( !defined( 'WQPMB_VERSION' ) ) {
    27     define( 'WQPMB_VERSION', '1.0.7');
     27    define( 'WQPMB_VERSION', '1.1.0.0');
    2828}
    2929
  • wc-quantity-plus-minus-button/trunk/readme.txt

    r2673625 r2674012  
    33Contributors: codersaiful, codeastrology
    44Tags: woocommerce quantity, plus minus button, quantity, qty button
     5Version: 1.1.0
    56Requires at least: 4.0.0
    67Tested up to: 5.9
    78Requires PHP: 5.6
    89WC requires at least: 3.7
    9 WC tested up to: 5.6.0
     10WC tested up to: 6.1.1
    1011License: GPL3+
    1112License URI: http://www.gnu.org/licenses/gpl.html
     
    136137== Change log ==
    137138
    138 = 1.0.9 =
    139 * Fixed: body-class issue on WooCommerce My Subscriptions menu
    140 
    141 = 1.0.8 =
    142 * Integrate with sold indivisual
    143 
    144139= 1.0.6 =
    145140
  • wc-quantity-plus-minus-button/trunk/template/global/quantity-input.php

    r2589188 r2674012  
    3838    exit;
    3939}
    40 
    41 
    4240
    4341if ( $max_value && $min_value === $max_value ) {
Note: See TracChangeset for help on using the changeset viewer.