Plugin Directory

Changeset 1770121

Timestamp:
11/18/2017 12:38:57 PM (7 years ago)
Author:
sk.shaikat
Message:

update version to 1.5.8.5

Location:
woocommerce-upcoming-product
Files:
15 added
2 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-upcoming-product/trunk/readme.txt

    r1769939 r1770121  
    55Requires at least: 3.1
    66Tested up to: 4.9
    7 Stable tag: 1.5.8.4
     7Stable tag: 1.5.8.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4848
    4949== Change log ==
     50
     51
     52
    5053
    5154= 1.5.8.3 = Nov 18, 2017
  • woocommerce-upcoming-product/trunk/woocommerce-upcoming-product.php

    r1769939 r1770121  
    44Plugin URI: https://github.com/Sk-Shaikat/woocommerce-upcoming-product
    55Description: Best Plugin to Manage your upcoming product easily in WooCommerce.
    6 Version: 1.5.8.4
     6Version: 1.5.8.
    77Author: Sk Shaikat
    88Author URI: https://www.facebook.com/skshaikat18
     
    7979        add_action( 'woocommerce_process_product_meta_bundle', array( $this, 'wup_save_upcoming_options' ), 10 );
    8080
    81         add_filter( 'woocommerce_add_to_cart_validation', array( $this, 'wup_stop_adding_to_cart' ), 2, 10 );
     81        , 10 );
    8282
    8383        // image ribbon
     
    593593     * return bool
    594594     */
    595     function wup_stop_adding_to_cart( $chack, $product_id  ) {
    596         if ( get_post_meta( $product_id, '_upcoming', true ) != 'yes' ) {
    597             return true;
    598         } else if ( get_post_meta( $product_id, '_upcoming', true ) != 'yes' && WC_Admin_Settings::get_option( 'wup_button_hide', 'no' ) == 'no' ) {
    599             return false;
     595    function wup_stop_adding_to_cart( $chack, $product_id, $quantity ) {
     596        $button_hide = WC_Admin_Settings::get_option( 'wup_button_hide', 'no' );
     597        if ( $button_hide != 'no' ) {
     598            if ( get_post_meta( $product_id, '_upcoming', true ) != 'yes' ) {
     599                return false;
     600            }
    600601        }
    601602    }
Note: See TracChangeset for help on using the changeset viewer.