WooCommerce PayPal Powered by Braintree Payment Gateway - Version 2.6.1

Version Description

Download this release

Release Info

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

Code changes from version 2.6.0 to 2.6.1

class-wc-braintree.php CHANGED
@@ -27,53 +27,15 @@ use SkyVerge\WooCommerce\PluginFramework\v5_10_7 as Framework;
27
  defined( 'ABSPATH' ) or exit;
28
 
29
  /**
30
- * # WooCommerce Gateway Braintree Main Plugin Class
31
- *
32
- * ## Plugin Overview
33
- *
34
- * This plugin adds Braintree as a payment gateway. Braintree's javascript library is used to encrypt the credit card
35
- * fields prior to form submission, so it acts like a direct gateway but without the burden of heavy PCI compliance. Logged
36
- * in customers' credit cards are saved to the braintree vault by default. Subscriptions and Pre-Orders are supported via
37
- * the Add-Ons class.
38
- *
39
- * ## Admin Considerations
40
- *
41
- * A user view/edit field is added for the Braintree customer ID so it can easily be changed by the admin.
42
- *
43
- * ## Frontend Considerations
44
- *
45
- * Both the payment fields on checkout (and checkout->pay) and the My cards section on the My Account page are template
46
- * files for easy customization.
47
- *
48
- * ## Database
49
- *
50
- * ### Global Settings
51
- *
52
- * + `woocommerce_braintree_settings` - the serialized braintree settings array
53
- *
54
- * ### Options table
55
- *
56
- * + `wc_braintree_version` - the current plugin version, set on install/upgrade
57
- *
58
- * ### Order Meta
59
- *
60
- * + `_wc_braintree_trans_id` - the braintree transaction ID
61
- * + `_wc_braintree_trans_mode` - the environment the braintree transaction was created in
62
- * + `_wc_braintree_card_type` - the card type used for the order
63
- * + `_wc_braintree_card_last_four` - the last four digits of the card used for the order
64
- * + `_wc_braintree_card_exp_date` - the expiration date of the card used for the order
65
- * + `_wc_braintree_customer_id` - the braintree customer ID for the order, set only if the customer is logged in/creating an account
66
- * + `_wc_braintree_cc_token` - the braintree token for the credit card used for the order, set only if the customer is logged in/creating an account
67
- *
68
- * ### User Meta
69
- * + `_wc_braintree_customer_id` - the braintree customer ID for the user
70
  *
 
71
  */
72
  class WC_Braintree extends Framework\SV_WC_Payment_Gateway_Plugin {
73
 
74
 
75
  /** plugin version number */
76
- const VERSION = '2.6.0';
77
 
78
  /** Braintree JS SDK version */
79
  const BRAINTREE_JS_SDK_VERSION = '3.73.1';
27
  defined( 'ABSPATH' ) or exit;
28
 
29
  /**
30
+ * WooCommerce Gateway Braintree Main Plugin Class.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  *
32
+ * @since 2.0.0
33
  */
34
  class WC_Braintree extends Framework\SV_WC_Payment_Gateway_Plugin {
35
 
36
 
37
  /** plugin version number */
38
+ const VERSION = '2.6.1';
39
 
40
  /** Braintree JS SDK version */
41
  const BRAINTREE_JS_SDK_VERSION = '3.73.1';
i18n/languages/woocommerce-gateway-paypal-powered-by-braintree.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the Braintree for WooCommerce Payment Gateway package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Braintree for WooCommerce Payment Gateway 2.6.0\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
- "POT-Creation-Date: 2021-04-19 20:05:51+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -13,52 +13,52 @@ msgstr ""
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
- #: class-wc-braintree.php:348
17
  msgid "Connected successfully."
18
  msgstr ""
19
 
20
- #: class-wc-braintree.php:351
21
  msgid "There was an error connecting your Braintree account. Please try again."
22
  msgstr ""
23
 
24
- #: class-wc-braintree.php:381
25
  msgid "Invalid connection request"
26
  msgstr ""
27
 
28
- #: class-wc-braintree.php:423
29
  msgid "Disconnected successfully."
30
  msgstr ""
31
 
32
- #: class-wc-braintree.php:448
33
  msgid "Invalid disconnect request"
34
  msgstr ""
35
 
36
- #: class-wc-braintree.php:541
37
  msgid ""
38
  "Heads up! You've enabled advanced fraud tools for Braintree. Please make "
39
  "sure that advanced fraud tools are also enabled in your Braintree account. "
40
  "Need help? See the %1$sdocumentation%2$s."
41
  msgstr ""
42
 
43
- #: class-wc-braintree.php:559
44
  msgid ""
45
  "Braintree for WooCommerce is almost ready. To get started, %1$sconnect your "
46
  "Braintree account%2$s."
47
  msgstr ""
48
 
49
- #: class-wc-braintree.php:571
50
  msgid ""
51
  "Upgrade successful! WooCommerce Braintree deactivated, and Braintree for "
52
  "WooCommerce has been %1$sconfigured with your previous settings%2$s."
53
  msgstr ""
54
 
55
- #: class-wc-braintree.php:584
56
  msgid ""
57
  "WooCommerce is not being forced over SSL -- Using PayPal with Braintree "
58
  "requires that checkout to be forced over SSL."
59
  msgstr ""
60
 
61
- #: class-wc-braintree.php:619
62
  #. translators: Placeholders: %1$s - payment gateway name tag, %2$s - <a> tag,
63
  #. %3$s - </a> tag
64
  msgid ""
@@ -70,11 +70,11 @@ msgstr ""
70
  msgid "Braintree for WooCommerce Payment Gateway"
71
  msgstr ""
72
 
73
- #: class-wc-braintree.php:725
74
  msgid "Configure Credit Card"
75
  msgstr ""
76
 
77
- #: class-wc-braintree.php:725
78
  msgid "Configure PayPal"
79
  msgstr ""
80
 
2
  # This file is distributed under the same license as the Braintree for WooCommerce Payment Gateway package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Braintree for WooCommerce Payment Gateway 2.6.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
+ "POT-Creation-Date: 2021-05-27 10:31:52+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
16
+ #: class-wc-braintree.php:310
17
  msgid "Connected successfully."
18
  msgstr ""
19
 
20
+ #: class-wc-braintree.php:313
21
  msgid "There was an error connecting your Braintree account. Please try again."
22
  msgstr ""
23
 
24
+ #: class-wc-braintree.php:343
25
  msgid "Invalid connection request"
26
  msgstr ""
27
 
28
+ #: class-wc-braintree.php:385
29
  msgid "Disconnected successfully."
30
  msgstr ""
31
 
32
+ #: class-wc-braintree.php:410
33
  msgid "Invalid disconnect request"
34
  msgstr ""
35
 
36
+ #: class-wc-braintree.php:503
37
  msgid ""
38
  "Heads up! You've enabled advanced fraud tools for Braintree. Please make "
39
  "sure that advanced fraud tools are also enabled in your Braintree account. "
40
  "Need help? See the %1$sdocumentation%2$s."
41
  msgstr ""
42
 
43
+ #: class-wc-braintree.php:521
44
  msgid ""
45
  "Braintree for WooCommerce is almost ready. To get started, %1$sconnect your "
46
  "Braintree account%2$s."
47
  msgstr ""
48
 
49
+ #: class-wc-braintree.php:533
50
  msgid ""
51
  "Upgrade successful! WooCommerce Braintree deactivated, and Braintree for "
52
  "WooCommerce has been %1$sconfigured with your previous settings%2$s."
53
  msgstr ""
54
 
55
+ #: class-wc-braintree.php:546
56
  msgid ""
57
  "WooCommerce is not being forced over SSL -- Using PayPal with Braintree "
58
  "requires that checkout to be forced over SSL."
59
  msgstr ""
60
 
61
+ #: class-wc-braintree.php:581
62
  #. translators: Placeholders: %1$s - payment gateway name tag, %2$s - <a> tag,
63
  #. %3$s - </a> tag
64
  msgid ""
70
  msgid "Braintree for WooCommerce Payment Gateway"
71
  msgstr ""
72
 
73
+ #: class-wc-braintree.php:687
74
  msgid "Configure Credit Card"
75
  msgstr ""
76
 
77
+ #: class-wc-braintree.php:687
78
  msgid "Configure PayPal"
79
  msgstr ""
80
 
includes/api/responses/class-wc-braintree-api-customer-response.php CHANGED
@@ -32,6 +32,8 @@ defined( 'ABSPATH' ) or exit;
32
  * Handles parsing customer responses
33
  *
34
  * @since 3.0.0
 
 
35
  */
36
  class WC_Braintree_API_Customer_Response extends WC_Braintree_API_Vault_Response implements Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response, Framework\SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response, Framework\SV_WC_Payment_Gateway_API_Customer_Response {
37
 
@@ -93,21 +95,22 @@ class WC_Braintree_API_Customer_Response extends WC_Braintree_API_Vault_Response
93
 
94
 
95
  /**
96
- * Get the payment tokens for the customer
97
  *
98
  * @link https://developers.braintreepayments.com/reference/response/customer/php
99
  *
100
  * @since 3.0.0
 
101
  * @return array associative array of token => WC_Braintree_Payment_Method objects
102
  */
103
  public function get_payment_tokens() {
104
 
105
- $tokens = array();
106
 
107
- foreach ( $this->response->paymentMethods() as $method ) {
108
 
109
  // only credit cards or PayPal accounts
110
- if ( ! in_array( get_class( $method ), array( 'Braintree\CreditCard', 'Braintree\PayPalAccount' ) ) ) {
111
  continue;
112
  }
113
 
32
  * Handles parsing customer responses
33
  *
34
  * @since 3.0.0
35
+ *
36
+ * @property Braintree\Customer $response
37
  */
38
  class WC_Braintree_API_Customer_Response extends WC_Braintree_API_Vault_Response implements Framework\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response, Framework\SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response, Framework\SV_WC_Payment_Gateway_API_Customer_Response {
39
 
95
 
96
 
97
  /**
98
+ * Get the payment tokens for the customer.
99
  *
100
  * @link https://developers.braintreepayments.com/reference/response/customer/php
101
  *
102
  * @since 3.0.0
103
+ *
104
  * @return array associative array of token => WC_Braintree_Payment_Method objects
105
  */
106
  public function get_payment_tokens() {
107
 
108
+ $tokens = [];
109
 
110
+ foreach ( $this->response->paymentMethods as $method ) {
111
 
112
  // only credit cards or PayPal accounts
113
+ if ( ! in_array( get_class( $method ), [ 'Braintree\CreditCard', 'Braintree\PayPalAccount' ] ) ) {
114
  continue;
115
  }
116
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, dsmithweb, fullysupportedphil, corsonr, zandyring, skyverge
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: 5.7.1
6
  Requires PHP: 5.4
7
- Stable tag: 2.6.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -107,6 +107,9 @@ If not, please get in touch with us through the [plugin forums](https://wordpres
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 2021.04.19 - version 2.6.0 =
111
  * Tweak - Add a filter to allow customizing the disabled funding PayPal options
112
  * Fix - Prevent a PHP notice triggered while trying to access the cart object too early in a request
2
  Contributors: automattic, akeda, allendav, royho, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, dsmithweb, fullysupportedphil, corsonr, zandyring, skyverge
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: 5.7.2
6
  Requires PHP: 5.4
7
+ Stable tag: 2.6.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 2021.05.27 - version 2.6.1
111
+ * Fix - Address an uncaught exception when getting the payment methods for a customer
112
+
113
  = 2021.04.19 - version 2.6.0 =
114
  * Tweak - Add a filter to allow customizing the disabled funding PayPal options
115
  * Fix - Prevent a PHP notice triggered while trying to access the cart object too early in a request
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit11b67b4ac7751169ccc19f66f26a8f0f::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitf37bec5afd2a7aa6257c0f78fd20af7b::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -37,13 +37,11 @@ namespace Composer\Autoload;
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see https://www.php-fig.org/psr/psr-0/
41
- * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
45
- private $vendorDir;
46
-
47
  // PSR-4
48
  private $prefixLengthsPsr4 = array();
49
  private $prefixDirsPsr4 = array();
@@ -59,13 +57,6 @@ class ClassLoader
59
  private $missingClasses = array();
60
  private $apcuPrefix;
61
 
62
- private static $registeredLoaders = array();
63
-
64
- public function __construct($vendorDir = null)
65
- {
66
- $this->vendorDir = $vendorDir;
67
- }
68
-
69
  public function getPrefixes()
70
  {
71
  if (!empty($this->prefixesPsr0)) {
@@ -309,17 +300,6 @@ class ClassLoader
309
  public function register($prepend = false)
310
  {
311
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
312
-
313
- if (null === $this->vendorDir) {
314
- return;
315
- }
316
-
317
- if ($prepend) {
318
- self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
319
- } else {
320
- unset(self::$registeredLoaders[$this->vendorDir]);
321
- self::$registeredLoaders[$this->vendorDir] = $this;
322
- }
323
  }
324
 
325
  /**
@@ -328,10 +308,6 @@ class ClassLoader
328
  public function unregister()
329
  {
330
  spl_autoload_unregister(array($this, 'loadClass'));
331
-
332
- if (null !== $this->vendorDir) {
333
- unset(self::$registeredLoaders[$this->vendorDir]);
334
- }
335
  }
336
 
337
  /**
@@ -391,16 +367,6 @@ class ClassLoader
391
  return $file;
392
  }
393
 
394
- /**
395
- * Returns the currently registered loaders indexed by their corresponding vendor directories.
396
- *
397
- * @return self[]
398
- */
399
- public static function getRegisteredLoaders()
400
- {
401
- return self::$registeredLoaders;
402
- }
403
-
404
  private function findFileWithExtension($class, $ext)
405
  {
406
  // PSR-4 lookup
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see http://www.php-fig.org/psr/psr-0/
41
+ * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
 
 
45
  // PSR-4
46
  private $prefixLengthsPsr4 = array();
47
  private $prefixDirsPsr4 = array();
57
  private $missingClasses = array();
58
  private $apcuPrefix;
59
 
 
 
 
 
 
 
 
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
300
  public function register($prepend = false)
301
  {
302
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
 
 
 
 
 
 
 
 
 
 
 
303
  }
304
 
305
  /**
308
  public function unregister()
309
  {
310
  spl_autoload_unregister(array($this, 'loadClass'));
 
 
 
 
311
  }
312
 
313
  /**
367
  return $file;
368
  }
369
 
 
 
 
 
 
 
 
 
 
 
370
  private function findFileWithExtension($class, $ext)
371
  {
372
  // PSR-4 lookup
vendor/composer/InstalledVersions.php CHANGED
@@ -12,7 +12,6 @@
12
 
13
  namespace Composer;
14
 
15
- use Composer\Autoload\ClassLoader;
16
  use Composer\Semver\VersionParser;
17
 
18
 
@@ -30,7 +29,7 @@ private static $installed = array (
30
  'aliases' =>
31
  array (
32
  ),
33
- 'reference' => 'c770b327db8c2b591fb06344209ad9c3cc5f3ade',
34
  'name' => '__root__',
35
  ),
36
  'versions' =>
@@ -42,7 +41,7 @@ private static $installed = array (
42
  'aliases' =>
43
  array (
44
  ),
45
- 'reference' => 'c770b327db8c2b591fb06344209ad9c3cc5f3ade',
46
  ),
47
  'braintree/braintree_php' =>
48
  array (
@@ -55,17 +54,15 @@ private static $installed = array (
55
  ),
56
  'skyverge/wc-plugin-framework' =>
57
  array (
58
- 'pretty_version' => '5.10.7',
59
- 'version' => '5.10.7.0',
60
  'aliases' =>
61
  array (
62
  ),
63
- 'reference' => '3a2c8cb4af31bd2c5e1af38647c249c37575db2c',
64
  ),
65
  ),
66
  );
67
- private static $canGetVendors;
68
- private static $installedByVendor = array();
69
 
70
 
71
 
@@ -75,17 +72,7 @@ private static $installedByVendor = array();
75
 
76
  public static function getInstalledPackages()
77
  {
78
- $packages = array();
79
- foreach (self::getInstalled() as $installed) {
80
- $packages[] = array_keys($installed['versions']);
81
- }
82
-
83
-
84
- if (1 === \count($packages)) {
85
- return $packages[0];
86
- }
87
-
88
- return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
89
  }
90
 
91
 
@@ -98,13 +85,7 @@ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
98
 
99
  public static function isInstalled($packageName)
100
  {
101
- foreach (self::getInstalled() as $installed) {
102
- if (isset($installed['versions'][$packageName])) {
103
- return true;
104
- }
105
- }
106
-
107
- return false;
108
  }
109
 
110
 
@@ -139,50 +120,42 @@ return $provided->matches($constraint);
139
 
140
  public static function getVersionRanges($packageName)
141
  {
142
- foreach (self::getInstalled() as $installed) {
143
- if (!isset($installed['versions'][$packageName])) {
144
- continue;
145
  }
146
 
147
  $ranges = array();
148
- if (isset($installed['versions'][$packageName]['pretty_version'])) {
149
- $ranges[] = $installed['versions'][$packageName]['pretty_version'];
150
  }
151
- if (array_key_exists('aliases', $installed['versions'][$packageName])) {
152
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
153
  }
154
- if (array_key_exists('replaced', $installed['versions'][$packageName])) {
155
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
156
  }
157
- if (array_key_exists('provided', $installed['versions'][$packageName])) {
158
- $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
159
  }
160
 
161
  return implode(' || ', $ranges);
162
  }
163
 
164
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
165
- }
166
-
167
 
168
 
169
 
170
 
171
  public static function getVersion($packageName)
172
  {
173
- foreach (self::getInstalled() as $installed) {
174
- if (!isset($installed['versions'][$packageName])) {
175
- continue;
176
  }
177
 
178
- if (!isset($installed['versions'][$packageName]['version'])) {
179
  return null;
180
  }
181
 
182
- return $installed['versions'][$packageName]['version'];
183
- }
184
-
185
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
186
  }
187
 
188
 
@@ -191,19 +164,15 @@ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed
191
 
192
  public static function getPrettyVersion($packageName)
193
  {
194
- foreach (self::getInstalled() as $installed) {
195
- if (!isset($installed['versions'][$packageName])) {
196
- continue;
197
  }
198
 
199
- if (!isset($installed['versions'][$packageName]['pretty_version'])) {
200
  return null;
201
  }
202
 
203
- return $installed['versions'][$packageName]['pretty_version'];
204
- }
205
-
206
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
207
  }
208
 
209
 
@@ -212,19 +181,15 @@ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed
212
 
213
  public static function getReference($packageName)
214
  {
215
- foreach (self::getInstalled() as $installed) {
216
- if (!isset($installed['versions'][$packageName])) {
217
- continue;
218
  }
219
 
220
- if (!isset($installed['versions'][$packageName]['reference'])) {
221
  return null;
222
  }
223
 
224
- return $installed['versions'][$packageName]['reference'];
225
- }
226
-
227
- throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
228
  }
229
 
230
 
@@ -233,9 +198,7 @@ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed
233
 
234
  public static function getRootPackage()
235
  {
236
- $installed = self::getInstalled();
237
-
238
- return $installed[0]['root'];
239
  }
240
 
241
 
@@ -270,32 +233,5 @@ return self::$installed;
270
  public static function reload($data)
271
  {
272
  self::$installed = $data;
273
- self::$installedByVendor = array();
274
- }
275
-
276
-
277
-
278
-
279
- private static function getInstalled()
280
- {
281
- if (null === self::$canGetVendors) {
282
- self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
283
- }
284
-
285
- $installed = array();
286
-
287
- if (self::$canGetVendors) {
288
- foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
289
- if (isset(self::$installedByVendor[$vendorDir])) {
290
- $installed[] = self::$installedByVendor[$vendorDir];
291
- } elseif (is_file($vendorDir.'/composer/installed.php')) {
292
- $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
293
- }
294
- }
295
- }
296
-
297
- $installed[] = self::$installed;
298
-
299
- return $installed;
300
  }
301
  }
12
 
13
  namespace Composer;
14
 
 
15
  use Composer\Semver\VersionParser;
16
 
17
 
29
  'aliases' =>
30
  array (
31
  ),
32
+ 'reference' => 'af5e91b6ee08f98909e134e48180de218afa133b',
33
  'name' => '__root__',
34
  ),
35
  'versions' =>
41
  'aliases' =>
42
  array (
43
  ),
44
+ 'reference' => 'af5e91b6ee08f98909e134e48180de218afa133b',
45
  ),
46
  'braintree/braintree_php' =>
47
  array (
54
  ),
55
  'skyverge/wc-plugin-framework' =>
56
  array (
57
+ 'pretty_version' => '5.10.4',
58
+ 'version' => '5.10.4.0',
59
  'aliases' =>
60
  array (
61
  ),
62
+ 'reference' => '70956c8f3fa621867af1af91f3cde0d17ae884fc',
63
  ),
64
  ),
65
  );
 
 
66
 
67
 
68
 
72
 
73
  public static function getInstalledPackages()
74
  {
75
+ return array_keys(self::$installed['versions']);
 
 
 
 
 
 
 
 
 
 
76
  }
77
 
78
 
85
 
86
  public static function isInstalled($packageName)
87
  {
88
+ return isset(self::$installed['versions'][$packageName]);
 
 
 
 
 
 
89
  }
90
 
91
 
120
 
121
  public static function getVersionRanges($packageName)
122
  {
123
+ if (!isset(self::$installed['versions'][$packageName])) {
124
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
 
125
  }
126
 
127
  $ranges = array();
128
+ if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
129
+ $ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
130
  }
131
+ if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
132
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
133
  }
134
+ if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
135
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
136
  }
137
+ if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
138
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
139
  }
140
 
141
  return implode(' || ', $ranges);
142
  }
143
 
 
 
 
144
 
145
 
146
 
147
 
148
  public static function getVersion($packageName)
149
  {
150
+ if (!isset(self::$installed['versions'][$packageName])) {
151
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
 
152
  }
153
 
154
+ if (!isset(self::$installed['versions'][$packageName]['version'])) {
155
  return null;
156
  }
157
 
158
+ return self::$installed['versions'][$packageName]['version'];
 
 
 
159
  }
160
 
161
 
164
 
165
  public static function getPrettyVersion($packageName)
166
  {
167
+ if (!isset(self::$installed['versions'][$packageName])) {
168
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
 
169
  }
170
 
171
+ if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
172
  return null;
173
  }
174
 
175
+ return self::$installed['versions'][$packageName]['pretty_version'];
 
 
 
176
  }
177
 
178
 
181
 
182
  public static function getReference($packageName)
183
  {
184
+ if (!isset(self::$installed['versions'][$packageName])) {
185
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
 
186
  }
187
 
188
+ if (!isset(self::$installed['versions'][$packageName]['reference'])) {
189
  return null;
190
  }
191
 
192
+ return self::$installed['versions'][$packageName]['reference'];
 
 
 
193
  }
194
 
195
 
198
 
199
  public static function getRootPackage()
200
  {
201
+ return self::$installed['root'];
 
 
202
  }
203
 
204
 
233
  public static function reload($data)
234
  {
235
  self::$installed = $data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  }
237
  }
vendor/composer/autoload_classmap.php CHANGED
@@ -6,5 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit11b67b4ac7751169ccc19f66f26a8f0f
6
  {
7
  private static $loader;
8
 
@@ -22,17 +22,15 @@ class ComposerAutoloaderInit11b67b4ac7751169ccc19f66f26a8f0f
22
  return self::$loader;
23
  }
24
 
25
- require __DIR__ . '/platform_check.php';
26
-
27
- spl_autoload_register(array('ComposerAutoloaderInit11b67b4ac7751169ccc19f66f26a8f0f', 'loadClassLoader'), true, true);
28
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit11b67b4ac7751169ccc19f66f26a8f0f', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
- require __DIR__ . '/autoload_static.php';
34
 
35
- call_user_func(\Composer\Autoload\ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitf37bec5afd2a7aa6257c0f78fd20af7b
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitf37bec5afd2a7aa6257c0f78fd20af7b', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitf37bec5afd2a7aa6257c0f78fd20af7b', 'loadClassLoader'));
 
 
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
+ require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitf37bec5afd2a7aa6257c0f78fd20af7b::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
@@ -30,17 +30,12 @@ class ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f
30
  ),
31
  );
32
 
33
- public static $classMap = array (
34
- 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
35
- );
36
-
37
  public static function getInitializer(ClassLoader $loader)
38
  {
39
  return \Closure::bind(function () use ($loader) {
40
- $loader->prefixLengthsPsr4 = ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f::$prefixLengthsPsr4;
41
- $loader->prefixDirsPsr4 = ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f::$prefixDirsPsr4;
42
- $loader->prefixesPsr0 = ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f::$prefixesPsr0;
43
- $loader->classMap = ComposerStaticInit11b67b4ac7751169ccc19f66f26a8f0f::$classMap;
44
 
45
  }, null, ClassLoader::class);
46
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitf37bec5afd2a7aa6257c0f78fd20af7b
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
30
  ),
31
  );
32
 
 
 
 
 
33
  public static function getInitializer(ClassLoader $loader)
34
  {
35
  return \Closure::bind(function () use ($loader) {
36
+ $loader->prefixLengthsPsr4 = ComposerStaticInitf37bec5afd2a7aa6257c0f78fd20af7b::$prefixLengthsPsr4;
37
+ $loader->prefixDirsPsr4 = ComposerStaticInitf37bec5afd2a7aa6257c0f78fd20af7b::$prefixDirsPsr4;
38
+ $loader->prefixesPsr0 = ComposerStaticInitf37bec5afd2a7aa6257c0f78fd20af7b::$prefixesPsr0;
 
39
 
40
  }, null, ClassLoader::class);
41
  }
vendor/composer/installed.json CHANGED
@@ -1,88 +1,86 @@
1
- {
2
- "packages": [
3
- {
4
- "name": "braintree/braintree_php",
5
- "version": "3.34.0",
6
- "version_normalized": "3.34.0.0",
7
- "source": {
8
- "type": "git",
9
- "url": "https://github.com/braintree/braintree_php.git",
10
- "reference": "fd55c466d0d0088c67705d7ba0b3876d9767bfda"
11
- },
12
- "dist": {
13
- "type": "zip",
14
- "url": "https://api.github.com/repos/braintree/braintree_php/zipball/fd55c466d0d0088c67705d7ba0b3876d9767bfda",
15
- "reference": "fd55c466d0d0088c67705d7ba0b3876d9767bfda",
16
- "shasum": ""
17
- },
18
- "require": {
19
- "ext-curl": "*",
20
- "ext-dom": "*",
21
- "ext-hash": "*",
22
- "ext-openssl": "*",
23
- "ext-xmlwriter": "*",
24
- "php": ">=5.4.0"
25
- },
26
- "require-dev": {
27
- "phpunit/phpunit": "3.7.*"
28
- },
29
- "time": "2018-05-21T18:14:47+00:00",
30
- "type": "library",
31
- "installation-source": "dist",
32
- "autoload": {
33
- "psr-0": {
34
- "Braintree": "lib/"
35
- },
36
- "psr-4": {
37
- "Braintree\\": "lib/Braintree"
38
- }
39
- },
40
- "notification-url": "https://packagist.org/downloads/",
41
- "license": [
42
- "MIT"
43
- ],
44
- "authors": [
45
- {
46
- "name": "Braintree",
47
- "homepage": "https://www.braintreepayments.com"
48
- }
49
- ],
50
- "description": "Braintree PHP Client Library",
51
- "install-path": "../braintree/braintree_php"
52
  },
53
- {
54
- "name": "skyverge/wc-plugin-framework",
55
- "version": "5.10.7",
56
- "version_normalized": "5.10.7.0",
57
- "source": {
58
- "type": "git",
59
- "url": "https://github.com/skyverge/wc-plugin-framework.git",
60
- "reference": "3a2c8cb4af31bd2c5e1af38647c249c37575db2c"
61
- },
62
- "dist": {
63
- "type": "zip",
64
- "url": "https://api.github.com/repos/skyverge/wc-plugin-framework/zipball/3a2c8cb4af31bd2c5e1af38647c249c37575db2c",
65
- "reference": "3a2c8cb4af31bd2c5e1af38647c249c37575db2c",
66
- "shasum": ""
67
- },
68
- "require-dev": {
69
- "codeception/module-asserts": "^1.3",
70
- "codeception/module-db": "^1.0",
71
- "codeception/module-phpbrowser": "^1.0",
72
- "lucatume/wp-browser": "3.0.5",
73
- "phpcompatibility/php-compatibility": "9.3.5"
74
- },
75
- "time": "2021-04-15T18:24:53+00:00",
76
- "type": "library",
77
- "installation-source": "dist",
78
- "description": "The official SkyVerge WooCommerce plugin framework",
79
- "support": {
80
- "source": "https://github.com/skyverge/wc-plugin-framework/tree/5.10.7",
81
- "issues": "https://github.com/skyverge/wc-plugin-framework/issues"
82
  },
83
- "install-path": "../skyverge/wc-plugin-framework"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
85
- ],
86
- "dev": false,
87
- "dev-package-names": []
88
- }
1
+ [
2
+ {
3
+ "name": "braintree/braintree_php",
4
+ "version": "3.34.0",
5
+ "version_normalized": "3.34.0.0",
6
+ "source": {
7
+ "type": "git",
8
+ "url": "https://github.com/braintree/braintree_php.git",
9
+ "reference": "fd55c466d0d0088c67705d7ba0b3876d9767bfda"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  },
11
+ "dist": {
12
+ "type": "zip",
13
+ "url": "https://api.github.com/repos/braintree/braintree_php/zipball/fd55c466d0d0088c67705d7ba0b3876d9767bfda",
14
+ "reference": "fd55c466d0d0088c67705d7ba0b3876d9767bfda",
15
+ "shasum": ""
16
+ },
17
+ "require": {
18
+ "ext-curl": "*",
19
+ "ext-dom": "*",
20
+ "ext-hash": "*",
21
+ "ext-openssl": "*",
22
+ "ext-xmlwriter": "*",
23
+ "php": ">=5.4.0"
24
+ },
25
+ "require-dev": {
26
+ "phpunit/phpunit": "3.7.*"
27
+ },
28
+ "time": "2018-05-21T18:14:47+00:00",
29
+ "type": "library",
30
+ "installation-source": "dist",
31
+ "autoload": {
32
+ "psr-0": {
33
+ "Braintree": "lib/"
 
 
 
 
 
 
34
  },
35
+ "psr-4": {
36
+ "Braintree\\": "lib/Braintree"
37
+ }
38
+ },
39
+ "notification-url": "https://packagist.org/downloads/",
40
+ "license": [
41
+ "MIT"
42
+ ],
43
+ "authors": [
44
+ {
45
+ "name": "Braintree",
46
+ "homepage": "https://www.braintreepayments.com"
47
+ }
48
+ ],
49
+ "description": "Braintree PHP Client Library",
50
+ "support": {
51
+ "issues": "https://github.com/braintree/braintree_php/issues",
52
+ "source": "https://github.com/braintree/braintree_php/tree/3.34.0"
53
+ }
54
+ },
55
+ {
56
+ "name": "skyverge/wc-plugin-framework",
57
+ "version": "5.10.7",
58
+ "version_normalized": "5.10.7.0",
59
+ "source": {
60
+ "type": "git",
61
+ "url": "https://github.com/skyverge/wc-plugin-framework.git",
62
+ "reference": "3a2c8cb4af31bd2c5e1af38647c249c37575db2c"
63
+ },
64
+ "dist": {
65
+ "type": "zip",
66
+ "url": "https://api.github.com/repos/skyverge/wc-plugin-framework/zipball/3a2c8cb4af31bd2c5e1af38647c249c37575db2c",
67
+ "reference": "3a2c8cb4af31bd2c5e1af38647c249c37575db2c",
68
+ "shasum": ""
69
+ },
70
+ "require-dev": {
71
+ "codeception/module-asserts": "^1.3",
72
+ "codeception/module-db": "^1.0",
73
+ "codeception/module-phpbrowser": "^1.0",
74
+ "lucatume/wp-browser": "3.0.5",
75
+ "phpcompatibility/php-compatibility": "9.3.5"
76
+ },
77
+ "time": "2021-04-15T18:24:53+00:00",
78
+ "type": "library",
79
+ "installation-source": "source",
80
+ "description": "The official SkyVerge WooCommerce plugin framework",
81
+ "support": {
82
+ "source": "https://github.com/skyverge/wc-plugin-framework/tree/5.10.7",
83
+ "issues": "https://github.com/skyverge/wc-plugin-framework/issues"
84
  }
85
+ }
86
+ ]
 
 
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => 'c770b327db8c2b591fb06344209ad9c3cc5f3ade',
10
  'name' => '__root__',
11
  ),
12
  'versions' =>
@@ -18,7 +18,7 @@
18
  'aliases' =>
19
  array (
20
  ),
21
- 'reference' => 'c770b327db8c2b591fb06344209ad9c3cc5f3ade',
22
  ),
23
  'braintree/braintree_php' =>
24
  array (
@@ -31,12 +31,12 @@
31
  ),
32
  'skyverge/wc-plugin-framework' =>
33
  array (
34
- 'pretty_version' => '5.10.7',
35
- 'version' => '5.10.7.0',
36
  'aliases' =>
37
  array (
38
  ),
39
- 'reference' => '3a2c8cb4af31bd2c5e1af38647c249c37575db2c',
40
  ),
41
  ),
42
  );
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => 'af5e91b6ee08f98909e134e48180de218afa133b',
10
  'name' => '__root__',
11
  ),
12
  'versions' =>
18
  'aliases' =>
19
  array (
20
  ),
21
+ 'reference' => 'af5e91b6ee08f98909e134e48180de218afa133b',
22
  ),
23
  'braintree/braintree_php' =>
24
  array (
31
  ),
32
  'skyverge/wc-plugin-framework' =>
33
  array (
34
+ 'pretty_version' => '5.10.4',
35
+ 'version' => '5.10.4.0',
36
  'aliases' =>
37
  array (
38
  ),
39
+ 'reference' => '70956c8f3fa621867af1af91f3cde0d17ae884fc',
40
  ),
41
  ),
42
  );
woocommerce-gateway-paypal-powered-by-braintree.php CHANGED
@@ -6,12 +6,12 @@
6
  * Description: Receive credit card or PayPal payments using Braintree for WooCommerce. 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+
7
  * Author: WooCommerce
8
  * Author URI: http://woocommerce.com/
9
- * Version: 2.6.0
10
  * Text Domain: woocommerce-gateway-paypal-powered-by-braintree
11
  * Domain Path: /i18n/languages/
12
  *
13
  * WC requires at least: 3.0.9
14
- * WC tested up to: 5.2.2
15
  *
16
  * Copyright (c) 2016-2020, Automattic, Inc.
17
  *
6
  * Description: Receive credit card or PayPal payments using Braintree for WooCommerce. 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+
7
  * Author: WooCommerce
8
  * Author URI: http://woocommerce.com/
9
+ * Version: 2.6.1
10
  * Text Domain: woocommerce-gateway-paypal-powered-by-braintree
11
  * Domain Path: /i18n/languages/
12
  *
13
  * WC requires at least: 3.0.9
14
+ * WC tested up to: 5.3.0
15
  *
16
  * Copyright (c) 2016-2020, Automattic, Inc.
17
  *