WooCommerce PayPal Powered by Braintree Payment Gateway - Version 1.2.7

Version Description

  • Fix - If you connected but did not save the settings, the enabled value would not be set and scripts would not enqueue
  • Fix - Disable customer initiated payment method changes - PayPal Braintree does not support zero amount transactions
  • Tweak - On new installs, debug messages are no longer sent to the WooCommerce System Status log by default
Download this release

Release Info

Developer woothemes
Plugin Icon 128x128 WooCommerce PayPal Powered by Braintree Payment Gateway
Version 1.2.7
Comparing to
See all releases

Code changes from version 1.2.6 to 1.2.7

classes/class-wc-gateway-paypal-braintree-subscription.php CHANGED
@@ -21,8 +21,11 @@ abstract class WC_Gateway_Paypal_Braintree_Subscription extends WC_Gateway_Paypa
21
  'subscription_amount_changes',
22
  'subscription_date_changes',
23
  'multiple_subscriptions',
24
- 'subscription_payment_method_change_admin',
25
- 'subscription_payment_method_change_customer',
 
 
 
26
  )
27
  );
28
 
21
  'subscription_amount_changes',
22
  'subscription_date_changes',
23
  'multiple_subscriptions',
24
+ 'subscription_payment_method_change_admin'
25
+ // NOTE: PayPal Braintree does NOT support $0 transactions so we
26
+ // must NOT enable subscription_payment_method_change_customer
27
+ // because Subscriptions requires that the gateway allow zero amount
28
+ // transactions for that to work
29
  )
30
  );
31
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveen
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal, braintree
4
  Requires at least: 4.4
5
  Tested up to: 4.6.1
6
- Stable tag: 1.2.6
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -110,6 +110,11 @@ New feature requests and bugs reports can be made in the plugin forum.
110
 
111
  == Changelog ==
112
 
 
 
 
 
 
113
  = 1.2.6 =
114
  * Fix - Issue where buyer unable to change subscription payment method with free-trial (order total is 0).
115
 
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal, braintree
4
  Requires at least: 4.4
5
  Tested up to: 4.6.1
6
+ Stable tag: 1.2.7
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
110
 
111
  == Changelog ==
112
 
113
+ = 1.2.7 =
114
+ * Fix - If you connected but did not save the settings, the enabled value would not be set and scripts would not enqueue
115
+ * Fix - Disable customer initiated payment method changes - PayPal Braintree does not support zero amount transactions
116
+ * Tweak - On new installs, debug messages are no longer sent to the WooCommerce System Status log by default
117
+
118
  = 1.2.6 =
119
  * Fix - Issue where buyer unable to change subscription payment method with free-trial (order total is 0).
120
 
woocommerce-gateway-paypal-powered-by-braintree.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Receive payments using Paypal Powered by Braintree. A server with cURL, SSL support, and a valid SSL certificate is required (for security reasons) for this gateway to function. Requires PHP 5.4+
6
  * Author: WooThemes
7
  * Author URI: http://woothemes.com/
8
- * Version: 1.2.6
9
  *
10
  * Copyright (c) 2016 WooThemes
11
  *
@@ -561,7 +561,15 @@ class WC_PayPal_Braintree_Loader {
561
  public function are_our_gateways_enabled() {
562
 
563
  // It doesn't matter which gateway we check, since setting changes are cloned between them
564
- $gateway_settings = get_option( 'woocommerce_paypalbraintree_paypal_settings', array() );
 
 
 
 
 
 
 
 
565
 
566
  if ( empty( $gateway_settings ) ) {
567
  return false;
@@ -733,7 +741,7 @@ class WC_PayPal_Braintree_Loader {
733
  'label' => __( 'Enable debugging messages', 'woocommerce-gateway-paypal-braintree' ),
734
  'type' => 'checkbox',
735
  'description' => __( 'Sends debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-paypal-braintree' ),
736
- 'default' => 'yes'
737
  )
738
  );
739
 
5
  * Description: Receive payments using Paypal Powered by Braintree. A server with cURL, SSL support, and a valid SSL certificate is required (for security reasons) for this gateway to function. Requires PHP 5.4+
6
  * Author: WooThemes
7
  * Author URI: http://woothemes.com/
8
+ * Version: 1.2.7
9
  *
10
  * Copyright (c) 2016 WooThemes
11
  *
561
  public function are_our_gateways_enabled() {
562
 
563
  // It doesn't matter which gateway we check, since setting changes are cloned between them
564
+ $gateway_settings = get_option( 'woocommerce_paypalbraintree_paypal_settings', array(
565
+ 'enabled' => 'yes',
566
+ 'title_paypal' => __( 'PayPal Account', 'woocommerce-gateway-paypal-braintree' ),
567
+ 'description_paypal' => '',
568
+ 'title_cards' => __( 'Credit or Debit Card (PayPal)', 'woocommerce-gateway-paypal-braintree' ),
569
+ 'description_cards' => '',
570
+ 'capture' => 'yes',
571
+ 'debug' => 'no',
572
+ ) );
573
 
574
  if ( empty( $gateway_settings ) ) {
575
  return false;
741
  'label' => __( 'Enable debugging messages', 'woocommerce-gateway-paypal-braintree' ),
742
  'type' => 'checkbox',
743
  'description' => __( 'Sends debug messages to the WooCommerce System Status log.', 'woocommerce-gateway-paypal-braintree' ),
744
+ 'default' => 'no'
745
  )
746
  );
747