WooCommerce PayPal Express Checkout Payment Gateway - Version 2.0.2

Version Description

  • 2020-05-28 =
  • Fix - Javascript errors during checkout when the Payment Action is set to Authorize. PR#754
  • Fix - Style the Smart Payment Buttons according to the chosen button size setting. PR#753
  • Tweak - Change the "or" separator used on the cart page to be consistent with other payment gateways (uppercase and 100% opacity). PR#755
Download this release

Release Info

Developer woothemes
Plugin Icon 128x128 WooCommerce PayPal Express Checkout Payment Gateway
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

assets/css/wc-gateway-ppec-frontend.css CHANGED
@@ -8,7 +8,6 @@
8
  }
9
  .wcppec-checkout-buttons__separator {
10
  display: block;
11
- opacity: .5;
12
  margin: 0 0 1em;
13
  }
14
  .wcppec-checkout-buttons__button {
@@ -56,3 +55,22 @@
56
  #payment .place-order .button {
57
  display: block;
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  }
9
  .wcppec-checkout-buttons__separator {
10
  display: block;
 
11
  margin: 0 0 1em;
12
  }
13
  .wcppec-checkout-buttons__button {
55
  #payment .place-order .button {
56
  display: block;
57
  }
58
+ /**
59
+ * PayPal Payment buttons generated via the SDK need to be styled via CSS.
60
+ * To be backwards compatible, these rules are inline with the widths used by PayPal JS.
61
+ *
62
+ * @see https://developer.paypal.com/docs/archive/checkout/how-to/customize-button/#size
63
+ * @see https://developer.paypal.com/docs/checkout/integration-features/customize-button/#size
64
+ */
65
+ .wc_ppec_small_payment_buttons {
66
+ width: 150px;
67
+ display: inline-block;
68
+ }
69
+ .wc_ppec_medium_payment_buttons {
70
+ width: 250px;
71
+ display: inline-block;
72
+ }
73
+ .wc_ppec_large_payment_buttons {
74
+ width: 350px;
75
+ display: inline-block;
76
+ }
assets/js/wc-gateway-ppec-smart-payment-buttons.js CHANGED
@@ -197,6 +197,9 @@
197
  // 'style.size' is no longer supported in the JS SDK. See https://developer.paypal.com/docs/checkout/integration-features/customize-button/#size.
198
  delete button_args['style']['size'];
199
 
 
 
 
200
  // Drop other args no longer needed in the JS SDK.
201
  var args_to_remove = [ 'env', 'locale', 'commit', 'funding', 'payment', 'onAuthorize' ];
202
  args_to_remove.forEach( function( arg ) {
197
  // 'style.size' is no longer supported in the JS SDK. See https://developer.paypal.com/docs/checkout/integration-features/customize-button/#size.
198
  delete button_args['style']['size'];
199
 
200
+ // Add a class selector so the buttons can be styled via css.
201
+ $( selector ).addClass( 'wc_ppec_' + button_size + '_payment_buttons' );
202
+
203
  // Drop other args no longer needed in the JS SDK.
204
  var args_to_remove = [ 'env', 'locale', 'commit', 'funding', 'payment', 'onAuthorize' ];
205
  args_to_remove.forEach( function( arg ) {
changelog.txt CHANGED
@@ -1,5 +1,10 @@
1
  *** Changelog ***
2
 
 
 
 
 
 
3
  = 2.0.1 - 2020-05-26 =
4
  * Fix - PayPal buttons not loading on the page, accompanied with the javascript/console error: "paypal.getFundingSources (or paypal.Buttons) is not a function". PR#740
5
 
1
  *** Changelog ***
2
 
3
+ = 2.0.2 - 2020-05-28 =
4
+ * Fix - Javascript errors during checkout when the Payment Action is set to Authorize. PR#754
5
+ * Fix - Style the Smart Payment Buttons according to the chosen button size setting. PR#753
6
+ * Tweak - Change the "or" separator used on the cart page to be consistent with other payment gateways (uppercase and 100% opacity). PR#755
7
+
8
  = 2.0.1 - 2020-05-26 =
9
  * Fix - PayPal buttons not loading on the page, accompanied with the javascript/console error: "paypal.getFundingSources (or paypal.Buttons) is not a function". PR#740
10
 
includes/class-wc-gateway-ppec-cart-handler.php CHANGED
@@ -351,9 +351,7 @@ class WC_Gateway_PPEC_Cart_Handler {
351
  <div class="wcppec-checkout-buttons woo_pp_cart_buttons_div">
352
 
353
  <?php if ( has_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout' ) ) : ?>
354
- <div class="wcppec-checkout-buttons__separator">
355
- <?php _e( '&mdash; or &mdash;', 'woocommerce-gateway-paypal-express-checkout' ); ?>
356
- </div>
357
  <?php endif; ?>
358
 
359
  <?php if ( 'yes' === $settings->use_spb ) :
@@ -537,6 +535,7 @@ class WC_Gateway_PPEC_Cart_Handler {
537
  $script_args = array(
538
  'client-id' => $settings->get_active_rest_client_id(),
539
  'merchant-id' => $client->get_payer_id(),
 
540
  'locale' => $settings->get_paypal_locale(),
541
  'components' => 'buttons,funding-eligibility',
542
  'commit' => 'checkout' === $page ? 'true' : 'false',
351
  <div class="wcppec-checkout-buttons woo_pp_cart_buttons_div">
352
 
353
  <?php if ( has_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout' ) ) : ?>
354
+ <div class="wcppec-checkout-buttons__separator">&mdash; <?php esc_html_e( 'OR', 'woocommerce-gateway-paypal-express-checkout' ); ?> &mdash;</div>
 
 
355
  <?php endif; ?>
356
 
357
  <?php if ( 'yes' === $settings->use_spb ) :
535
  $script_args = array(
536
  'client-id' => $settings->get_active_rest_client_id(),
537
  'merchant-id' => $client->get_payer_id(),
538
+ 'intent' => 'authorization' === $settings->get_paymentaction() ? 'authorize' : 'capture',
539
  'locale' => $settings->get_paypal_locale(),
540
  'components' => 'buttons,funding-eligibility',
541
  'commit' => 'checkout' === $page ? 'true' : 'false',
languages/woocommerce-gateway-paypal-express-checkout.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the WooCommerce PayPal Checkout Gateway plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce PayPal Checkout Gateway 2.0.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-05-26T08:06:44+10:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: woocommerce-gateway-paypal-express-checkout\n"
@@ -305,20 +305,20 @@ msgid "Cheatin&#8217; huh?"
305
  msgstr ""
306
 
307
  #: includes/class-wc-gateway-ppec-cart-handler.php:320
308
- #: includes/class-wc-gateway-ppec-cart-handler.php:365
309
- #: includes/class-wc-gateway-ppec-cart-handler.php:400
310
  msgid "Check out with PayPal"
311
  msgstr ""
312
 
313
- #: includes/class-wc-gateway-ppec-cart-handler.php:355
314
- msgid "&mdash; or &mdash;"
315
  msgstr ""
316
 
317
- #: includes/class-wc-gateway-ppec-cart-handler.php:370
318
  msgid "Pay with PayPal Credit"
319
  msgstr ""
320
 
321
- #: includes/class-wc-gateway-ppec-cart-handler.php:510
322
  msgid "An error occurred while processing your PayPal payment. Please contact the store owner for assistance."
323
  msgstr ""
324
 
2
  # This file is distributed under the same license as the WooCommerce PayPal Checkout Gateway plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce PayPal Checkout Gateway 2.0.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-05-28T16:20:25+10:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: woocommerce-gateway-paypal-express-checkout\n"
305
  msgstr ""
306
 
307
  #: includes/class-wc-gateway-ppec-cart-handler.php:320
308
+ #: includes/class-wc-gateway-ppec-cart-handler.php:363
309
+ #: includes/class-wc-gateway-ppec-cart-handler.php:398
310
  msgid "Check out with PayPal"
311
  msgstr ""
312
 
313
+ #: includes/class-wc-gateway-ppec-cart-handler.php:354
314
+ msgid "OR"
315
  msgstr ""
316
 
317
+ #: includes/class-wc-gateway-ppec-cart-handler.php:368
318
  msgid "Pay with PayPal Credit"
319
  msgstr ""
320
 
321
+ #: includes/class-wc-gateway-ppec-cart-handler.php:508
322
  msgid "An error occurred while processing your PayPal payment. Please contact the store owner for assistance."
323
  msgstr ""
324
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sa
4
  Requires at least: 4.4
5
  Tested up to: 5.4
6
  Requires PHP: 5.5
7
- Stable tag: 2.0.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -102,6 +102,11 @@ Please use this to inform us about bugs, or make contributions via PRs.
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
105
  = 2.0.1 - 2020-05-26 =
106
  * Fix - PayPal buttons not loading on the page, accompanied with the javascript/console error: "paypal.getFundingSources (or paypal.Buttons) is not a function". PR#740
107
 
4
  Requires at least: 4.4
5
  Tested up to: 5.4
6
  Requires PHP: 5.5
7
+ Stable tag: 2.0.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.0.2 - 2020-05-28 =
106
+ * Fix - Javascript errors during checkout when the Payment Action is set to Authorize. PR#754
107
+ * Fix - Style the Smart Payment Buttons according to the chosen button size setting. PR#753
108
+ * Tweak - Change the "or" separator used on the cart page to be consistent with other payment gateways (uppercase and 100% opacity). PR#755
109
+
110
  = 2.0.1 - 2020-05-26 =
111
  * Fix - PayPal buttons not loading on the page, accompanied with the javascript/console error: "paypal.getFundingSources (or paypal.Buttons) is not a function". PR#740
112
 
woocommerce-gateway-paypal-express-checkout.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PayPal Checkout Gateway
4
  * Plugin URI: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
5
  * Description: Accept all major credit and debit cards, plus Venmo and PayPal Credit in the US, presenting options in a customizable stack of payment buttons. Fast, seamless, and flexible.
6
- * Version: 2.0.1
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com
9
  * Copyright: © 2019 WooCommerce / PayPal.
@@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) {
27
  exit; // Exit if accessed directly
28
  }
29
 
30
- define( 'WC_GATEWAY_PPEC_VERSION', '2.0.1' );
31
 
32
  /**
33
  * Return instance of WC_Gateway_PPEC_Plugin.
3
  * Plugin Name: WooCommerce PayPal Checkout Gateway
4
  * Plugin URI: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
5
  * Description: Accept all major credit and debit cards, plus Venmo and PayPal Credit in the US, presenting options in a customizable stack of payment buttons. Fast, seamless, and flexible.
6
+ * Version: 2.0.2
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com
9
  * Copyright: © 2019 WooCommerce / PayPal.
27
  exit; // Exit if accessed directly
28
  }
29
 
30
+ define( 'WC_GATEWAY_PPEC_VERSION', '2.0.2' );
31
 
32
  /**
33
  * Return instance of WC_Gateway_PPEC_Plugin.