WooCommerce PayPal Express Checkout Payment Gateway - Version 1.6.20

Version Description

  • 2020-02-18 =
  • Fix - Upgrade the plugin on plugins loaded rather than on plugin init. PR#682
Download this release

Release Info

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

Code changes from version 1.6.19 to 1.6.20

assets/css/wc-gateway-ppec-frontend.css CHANGED
File without changes
assets/img/in-context-composite.png CHANGED
File without changes
changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  *** Changelog ***
2
 
 
 
 
3
  = 1.6.19 - 2020-02-06 =
4
  * Fix - Check if order exists before adding order actions. PR #653
5
  * Fix - Global attributes stripped before sent to PayPal if unicode characters. PR#470
1
  *** Changelog ***
2
 
3
+ = 1.6.20 - 2020-02-18 =
4
+ * Fix - Upgrade the plugin on plugins loaded rather than on plugin init. PR#682
5
+
6
  = 1.6.19 - 2020-02-06 =
7
  * Fix - Check if order exists before adding order actions. PR #653
8
  * Fix - Global attributes stripped before sent to PayPal if unicode characters. PR#470
includes/class-wc-gateway-ppec-plugin.php CHANGED
@@ -76,17 +76,12 @@ class WC_Gateway_PPEC_Plugin {
76
  $this->plugin_path = trailingslashit( plugin_dir_path( $this->file ) );
77
  $this->plugin_url = trailingslashit( plugin_dir_url( $this->file ) );
78
  $this->includes_path = $this->plugin_path . trailingslashit( 'includes' );
79
-
80
- // Updates
81
- if ( version_compare( $version, get_option( 'wc_ppec_version' ), '>' ) ) {
82
- $this->run_updater( $version );
83
- }
84
  }
85
 
86
  /**
87
  * Handle updates.
88
- * @param [type] $new_version [description]
89
- * @return [type] [description]
90
  */
91
  private function run_updater( $new_version ) {
92
  // Map old settings to settings API
@@ -163,6 +158,11 @@ class WC_Gateway_PPEC_Plugin {
163
  }
164
 
165
  $this->_check_dependencies();
 
 
 
 
 
166
  $this->_run();
167
  $this->_check_credentials();
168
 
@@ -386,6 +386,15 @@ class WC_Gateway_PPEC_Plugin {
386
  require_once( $this->includes_path . 'class-wc-gateway-ppec-client.php' );
387
  }
388
 
 
 
 
 
 
 
 
 
 
389
  /**
390
  * Link to settings screen.
391
  */
76
  $this->plugin_path = trailingslashit( plugin_dir_path( $this->file ) );
77
  $this->plugin_url = trailingslashit( plugin_dir_url( $this->file ) );
78
  $this->includes_path = $this->plugin_path . trailingslashit( 'includes' );
 
 
 
 
 
79
  }
80
 
81
  /**
82
  * Handle updates.
83
+ *
84
+ * @param string $new_version The plugin's new version.
85
  */
86
  private function run_updater( $new_version ) {
87
  // Map old settings to settings API
158
  }
159
 
160
  $this->_check_dependencies();
161
+
162
+ if ( $this->needs_update() ) {
163
+ $this->run_updater( $this->version );
164
+ }
165
+
166
  $this->_run();
167
  $this->_check_credentials();
168
 
386
  require_once( $this->includes_path . 'class-wc-gateway-ppec-client.php' );
387
  }
388
 
389
+ /**
390
+ * Checks if the plugin needs to record an update.
391
+ *
392
+ * @return bool Whether the plugin needs to be updated.
393
+ */
394
+ protected function needs_update() {
395
+ return version_compare( $this->version, get_option( 'wc_ppec_version' ), '>' );
396
+ }
397
+
398
  /**
399
  * Link to settings screen.
400
  */
languages/woocommerce-gateway-paypal-express-checkout.pot CHANGED
@@ -2,7 +2,7 @@
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 1.6.19\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout\n"
7
  "POT-Creation-Date: 2020-02-06 01:32:37+00:00\n"
8
  "MIME-Version: 1.0\n"
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 1.6.20\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout\n"
7
  "POT-Creation-Date: 2020-02-06 01:32:37+00:00\n"
8
  "MIME-Version: 1.0\n"
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes, akeda, dwainm, royho, allendav, slash1andy,
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal
4
  Requires at least: 4.4
5
  Tested up to: 5.3
6
- Stable tag: 1.6.19
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -101,6 +101,9 @@ Please use this to inform us about bugs, or make contributions via PRs.
101
 
102
  == Changelog ==
103
 
 
 
 
104
  = 1.6.19 - 2020-02-06 =
105
  * Fix - Check if order exists before adding order actions. PR #653
106
  * Fix - Global attributes stripped before sent to PayPal if unicode characters. PR#470
3
  Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal
4
  Requires at least: 4.4
5
  Tested up to: 5.3
6
+ Stable tag: 1.6.20
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
101
 
102
  == Changelog ==
103
 
104
+ = 1.6.20 - 2020-02-18 =
105
+ * Fix - Upgrade the plugin on plugins loaded rather than on plugin init. PR#682
106
+
107
  = 1.6.19 - 2020-02-06 =
108
  * Fix - Check if order exists before adding order actions. PR #653
109
  * Fix - Global attributes stripped before sent to PayPal if unicode characters. PR#470
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: 1.6.19
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', '1.6.19' );
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: 1.6.20
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', '1.6.20' );
31
 
32
  /**
33
  * Return instance of WC_Gateway_PPEC_Plugin.