Changeset 1770121
- Timestamp:
- 11/18/2017 12:38:57 PM (7 years ago)
- Location:
- woocommerce-upcoming-product
- Files:
-
- 15 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-upcoming-product/trunk/readme.txt
r1769939 r1770121 5 5 Requires at least: 3.1 6 6 Tested up to: 4.9 7 Stable tag: 1.5.8. 47 Stable tag: 1.5.8. 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 48 48 49 49 == Change log == 50 51 52 50 53 51 54 = 1.5.8.3 = Nov 18, 2017 -
woocommerce-upcoming-product/trunk/woocommerce-upcoming-product.php
r1769939 r1770121 4 4 Plugin URI: https://github.com/Sk-Shaikat/woocommerce-upcoming-product 5 5 Description: Best Plugin to Manage your upcoming product easily in WooCommerce. 6 Version: 1.5.8. 46 Version: 1.5.8. 7 7 Author: Sk Shaikat 8 8 Author URI: https://www.facebook.com/skshaikat18 … … 79 79 add_action( 'woocommerce_process_product_meta_bundle', array( $this, 'wup_save_upcoming_options' ), 10 ); 80 80 81 add_filter( 'woocommerce_add_to_cart_validation', array( $this, 'wup_stop_adding_to_cart' ), 2, 10 );81 , 10 ); 82 82 83 83 // image ribbon … … 593 593 * return bool 594 594 */ 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 } 600 601 } 601 602 }
Note: See TracChangeset
for help on using the changeset viewer.