Skip to content

Commit

Permalink
Express Checkout - Displaying on checkout page when it shouldn't, ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed May 5, 2017
1 parent 251ffba commit ea4806f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public function __construct($version) {
add_filter('woocommerce_thankyou_order_received_text', array($this, 'ec_order_received_text'), 10, 2);
add_action('wp_enqueue_scripts', array($this, 'ec_enqueue_scripts_product_page'));
add_action('woocommerce_before_cart_table', array($this, 'top_cart_button'));
add_action( 'woocommerce_after_mini_cart', array($this, 'mini_cart_button'));
if($this->show_on_cart == 'yes') {
add_action( 'woocommerce_after_mini_cart', array($this, 'mini_cart_button'));
}
add_action( 'woocommerce_before_cart', array( $this, 'woocommerce_before_cart'), 12 );
add_filter('woocommerce_is_sold_individually', array($this, 'angelleye_woocommerce_is_sold_individually'), 10, 2);
add_filter('woocommerce_ship_to_different_address_checked', array($this, 'angelleye_ship_to_different_address_checked'), 10,1);
Expand Down
6 changes: 3 additions & 3 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,10 @@ public function is_available() {
return false;
}
if(!AngellEYE_Utility::is_valid_for_use_paypal_express()) {
return false;
return false;
}
if( $this->show_on_checkout == 'regular' || $this->show_on_checkout == 'both') {
return true;
if( $this->show_on_checkout != 'regular' && $this->show_on_checkout != 'both') {
return false;
}
return parent::is_available();
}
Expand Down

0 comments on commit ea4806f

Please sign in to comment.