Skip to content

Commit

Permalink
Released V 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsridharan committed Feb 20, 2016
1 parent 72d8175 commit dbaed88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Requires at least: 3.0
Tested up to: 4.4
WC requires at least: 2.0
WC tested up to: 2.5.x
Stable tag: 0.14
Stable tag: 0.15
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -116,7 +116,11 @@ Please open an issue at <a href="https://github.com/technofreaky/woocomerce-quic


== Changelog ==
= 0.14 - 11/-9/2015 =
= 0.15 - 06/10/2015 =
* quick buy button was hidden even if stock exist. fixed
* Minor Bug Fix.

= 0.14 - 06/10/2015 =
* hide quick buy button when no stock
* Update To latest WooCommerce [WC 2.4.7] And Latest WordPress [WP 4.3.1]
* Minor Bug Fix.
Expand Down
11 changes: 4 additions & 7 deletions woocommerce-quick-buy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Plugin Name: Woocommerce Quick Buy
Plugin URI: http://varunsridharan.in/
Description: Add Quick buy button to redirect user to checkout / cart immediately when he click quick buy button
Version: 0.14
Version: 0.15
Author: Varun Sridharan
Author URI: http://varunsridharan.in/
License: GPL2
Expand Down Expand Up @@ -281,15 +281,12 @@ public function wc_quick_buy_shortcode_handler($attrs) {
$output = '';
$show_button = false;
$prod = shortcode_atts(array('product' => null, 'show_js' => false, 'name' => null), $attrs );
if($prod['product'] == null){ global $product;} else {$product = get_product($prod['product']); }
if($prod['product'] == null){ global $product; $shortcode_product = $product;} else {$shortcode_product = get_product($prod['product']); }

if( ! $product->backorders_allowed()){
$show_button = false;
}else if($product->is_in_stock()){
if($product->is_in_stock()){
$show_button = true;
}

//var_dump($product->backorders_allowed()); var_dump($product->is_in_stock());

if($show_button){
if($shortcode_product->is_type( 'simple' )){
$output = $this->wc_quick_buy_add_form_simple_product($shortcode_product->id, $prod['show_js'],$prod['name']);
Expand Down

0 comments on commit dbaed88

Please sign in to comment.