WooCommerce PayPal Powered by Braintree Payment Gateway - Version 2.7.0

Version Description

  • 2022-09-06 =
  • Add - PayPal Pay Later support to buyers from Italy and Spain.
Download this release

Release Info

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

Code changes from version 2.6.5 to 2.7.0

changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  *** Changelog ***
2
 
 
 
 
3
  = 2.6.5 - 2022-06-14 =
4
  * Tweak - Update development tools
5
  * Tweak - Bump "WordPress tested up to" version to 6.0
1
  *** Changelog ***
2
 
3
+ = 2.7.0 - 2022-09-06 =
4
+ * Add - PayPal Pay Later support to buyers from Italy and Spain.
5
+
6
  = 2.6.5 - 2022-06-14 =
7
  * Tweak - Update development tools
8
  * Tweak - Bump "WordPress tested up to" version to 6.0
class-wc-braintree.php CHANGED
@@ -35,7 +35,7 @@ class WC_Braintree extends Framework\SV_WC_Payment_Gateway_Plugin {
35
 
36
 
37
  /** plugin version number */
38
- const VERSION = '2.6.5';
39
 
40
  /** Braintree JS SDK version */
41
  const BRAINTREE_JS_SDK_VERSION = '3.73.1';
35
 
36
 
37
  /** plugin version number */
38
+ const VERSION = '2.7.0';
39
 
40
  /** Braintree JS SDK version */
41
  const BRAINTREE_JS_SDK_VERSION = '3.73.1';
includes/class-wc-gateway-braintree-paypal.php CHANGED
@@ -865,6 +865,8 @@ class WC_Gateway_Braintree_PayPal extends WC_Gateway_Braintree {
865
  'FR' => 'EUR',
866
  'DE' => 'EUR',
867
  'AU' => 'AUD',
 
 
868
  ];
869
 
870
  // gets the store base country
@@ -1174,7 +1176,7 @@ class WC_Gateway_Braintree_PayPal extends WC_Gateway_Braintree {
1174
  // replaces the United Kingdom country code to UK as accepted by the PayPal learn more link
1175
  $country = 'GB' === $country ? 'UK' : $country;
1176
 
1177
- if ( in_array( $country, [ 'US', 'UK', 'DE', 'AU' ] ) ) {
1178
 
1179
  return sprintf(
1180
  /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
@@ -1204,6 +1206,8 @@ class WC_Gateway_Braintree_PayPal extends WC_Gateway_Braintree {
1204
  'DE' => 'AdowVAtuU8-qDkQ36TGwtopX2Y2w6D3n42gc_w9bBWm2HieWyByc8-ugVHKY-xhESgAKdkLl-7XyHRJu',
1205
  'FR' => 'AQX3zTYQapL1f3gomgwDM-5lzHJsGTEQ6-UnAo8cc9QsyweMQOtjE30f5tRuBxbDS9loctREppyZRXXH',
1206
  'AU' => 'ATNkCFUvcxbsRysc_yrXH-mbAYlzvXsvayghKp3LPnX4uhgCHkX1MFv1Mj4Z3dYMvVgqeMwlAarYfXjB',
 
 
1207
  ];
1208
 
1209
  // returns the client ID if defined for the country or a default one that will work as a generic client
865
  'FR' => 'EUR',
866
  'DE' => 'EUR',
867
  'AU' => 'AUD',
868
+ 'IT' => 'EUR',
869
+ 'ES' => 'EUR',
870
  ];
871
 
872
  // gets the store base country
1176
  // replaces the United Kingdom country code to UK as accepted by the PayPal learn more link
1177
  $country = 'GB' === $country ? 'UK' : $country;
1178
 
1179
+ if ( in_array( $country, [ 'US', 'UK', 'DE', 'AU', 'IT', 'ES' ] ) ) {
1180
 
1181
  return sprintf(
1182
  /** translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag */
1206
  'DE' => 'AdowVAtuU8-qDkQ36TGwtopX2Y2w6D3n42gc_w9bBWm2HieWyByc8-ugVHKY-xhESgAKdkLl-7XyHRJu',
1207
  'FR' => 'AQX3zTYQapL1f3gomgwDM-5lzHJsGTEQ6-UnAo8cc9QsyweMQOtjE30f5tRuBxbDS9loctREppyZRXXH',
1208
  'AU' => 'ATNkCFUvcxbsRysc_yrXH-mbAYlzvXsvayghKp3LPnX4uhgCHkX1MFv1Mj4Z3dYMvVgqeMwlAarYfXjB',
1209
+ 'IT' => 'ATaaaGAlWJL3mNG4iWJN_YVu0qseY88v3L4_RgcHBfXhFmdc1BxkPhIetF9AL0whVeLF6xcB8PKiRn10',
1210
+ 'ES' => 'AdFciOp79QaJZQiuj2zPzuOcQTq3wy5AT7Iz5b15kN1IlUWUglFUHV4D2Grns2qY8U0PszMccZdM30Dn',
1211
  ];
1212
 
1213
  // returns the client ID if defined for the country or a default one that will work as a generic client
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: 6.0
6
  Requires PHP: 5.4
7
- Stable tag: 2.6.5
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
  = 2.6.5 - 2022-06-14 =
111
  * Tweak - Update development tools
112
  * Tweak - Bump "WordPress tested up to" version to 6.0
4
  Requires at least: 4.4
5
  Tested up to: 6.0
6
  Requires PHP: 5.4
7
+ Stable tag: 2.7.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 2.7.0 - 2022-09-06 =
111
+ * Add - PayPal Pay Later support to buyers from Italy and Spain.
112
+
113
  = 2.6.5 - 2022-06-14 =
114
  * Tweak - Update development tools
115
  * Tweak - Bump "WordPress tested up to" version to 6.0
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit4eb7cc5c69d78548ff291f7b4d963a73::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit0f0e14966061cbbec2a3562cf88406be::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -37,11 +37,13 @@ namespace Composer\Autoload;
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,6 +59,13 @@ class ClassLoader
57
  private $missingClasses = array();
58
  private $apcuPrefix;
59
 
 
 
 
 
 
 
 
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
@@ -300,6 +309,17 @@ class ClassLoader
300
  public function register($prepend = false)
301
  {
302
  spl_autoload_register(array($this, 'loadClass'), true, $prepend);
 
 
 
 
 
 
 
 
 
 
 
303
  }
304
 
305
  /**
@@ -308,13 +328,17 @@ class ClassLoader
308
  public function unregister()
309
  {
310
  spl_autoload_unregister(array($this, 'loadClass'));
 
 
 
 
311
  }
312
 
313
  /**
314
  * Loads the given class or interface.
315
  *
316
  * @param string $class The name of the class
317
- * @return bool|null True if loaded, null otherwise
318
  */
319
  public function loadClass($class)
320
  {
@@ -323,6 +347,8 @@ class ClassLoader
323
 
324
  return true;
325
  }
 
 
326
  }
327
 
328
  /**
@@ -367,6 +393,16 @@ class ClassLoader
367
  return $file;
368
  }
369
 
 
 
 
 
 
 
 
 
 
 
370
  private function findFileWithExtension($class, $ext)
371
  {
372
  // PSR-4 lookup
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
  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
  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
  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
  /**
338
  * Loads the given class or interface.
339
  *
340
  * @param string $class The name of the class
341
+ * @return true|null True if loaded, null otherwise
342
  */
343
  public function loadClass($class)
344
  {
347
 
348
  return true;
349
  }
350
+
351
+ return null;
352
  }
353
 
354
  /**
393
  return $file;
394
  }
395
 
396
+ /**
397
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
398
+ *
399
+ * @return self[]
400
+ */
401
+ public static function getRegisteredLoaders()
402
+ {
403
+ return self::$registeredLoaders;
404
+ }
405
+
406
  private function findFileWithExtension($class, $ext)
407
  {
408
  // PSR-4 lookup
vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer;
14
+
15
+ use Composer\Autoload\ClassLoader;
16
+ use Composer\Semver\VersionParser;
17
+
18
+ /**
19
+ * This class is copied in every Composer installed project and available to all
20
+ *
21
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
+ *
23
+ * To require it's presence, you can require `composer-runtime-api ^2.0`
24
+ */
25
+ class InstalledVersions
26
+ {
27
+ private static $installed;
28
+ private static $canGetVendors;
29
+ private static $installedByVendor = array();
30
+
31
+ /**
32
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
33
+ *
34
+ * @return string[]
35
+ * @psalm-return list<string>
36
+ */
37
+ public static function getInstalledPackages()
38
+ {
39
+ $packages = array();
40
+ foreach (self::getInstalled() as $installed) {
41
+ $packages[] = array_keys($installed['versions']);
42
+ }
43
+
44
+ if (1 === \count($packages)) {
45
+ return $packages[0];
46
+ }
47
+
48
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
49
+ }
50
+
51
+ /**
52
+ * Returns a list of all package names with a specific type e.g. 'library'
53
+ *
54
+ * @param string $type
55
+ * @return string[]
56
+ * @psalm-return list<string>
57
+ */
58
+ public static function getInstalledPackagesByType($type)
59
+ {
60
+ $packagesByType = array();
61
+
62
+ foreach (self::getInstalled() as $installed) {
63
+ foreach ($installed['versions'] as $name => $package) {
64
+ if (isset($package['type']) && $package['type'] === $type) {
65
+ $packagesByType[] = $name;
66
+ }
67
+ }
68
+ }
69
+
70
+ return $packagesByType;
71
+ }
72
+
73
+ /**
74
+ * Checks whether the given package is installed
75
+ *
76
+ * This also returns true if the package name is provided or replaced by another package
77
+ *
78
+ * @param string $packageName
79
+ * @param bool $includeDevRequirements
80
+ * @return bool
81
+ */
82
+ public static function isInstalled($packageName, $includeDevRequirements = true)
83
+ {
84
+ foreach (self::getInstalled() as $installed) {
85
+ if (isset($installed['versions'][$packageName])) {
86
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
87
+ }
88
+ }
89
+
90
+ return false;
91
+ }
92
+
93
+ /**
94
+ * Checks whether the given package satisfies a version constraint
95
+ *
96
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
97
+ *
98
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
99
+ *
100
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
101
+ * @param string $packageName
102
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
103
+ * @return bool
104
+ */
105
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
106
+ {
107
+ $constraint = $parser->parseConstraints($constraint);
108
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
109
+
110
+ return $provided->matches($constraint);
111
+ }
112
+
113
+ /**
114
+ * Returns a version constraint representing all the range(s) which are installed for a given package
115
+ *
116
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
117
+ * whether a given version of a package is installed, and not just whether it exists
118
+ *
119
+ * @param string $packageName
120
+ * @return string Version constraint usable with composer/semver
121
+ */
122
+ public static function getVersionRanges($packageName)
123
+ {
124
+ foreach (self::getInstalled() as $installed) {
125
+ if (!isset($installed['versions'][$packageName])) {
126
+ continue;
127
+ }
128
+
129
+ $ranges = array();
130
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
131
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
132
+ }
133
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
134
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
135
+ }
136
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
137
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
138
+ }
139
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
140
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
141
+ }
142
+
143
+ return implode(' || ', $ranges);
144
+ }
145
+
146
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
147
+ }
148
+
149
+ /**
150
+ * @param string $packageName
151
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
152
+ */
153
+ public static function getVersion($packageName)
154
+ {
155
+ foreach (self::getInstalled() as $installed) {
156
+ if (!isset($installed['versions'][$packageName])) {
157
+ continue;
158
+ }
159
+
160
+ if (!isset($installed['versions'][$packageName]['version'])) {
161
+ return null;
162
+ }
163
+
164
+ return $installed['versions'][$packageName]['version'];
165
+ }
166
+
167
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
168
+ }
169
+
170
+ /**
171
+ * @param string $packageName
172
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
173
+ */
174
+ public static function getPrettyVersion($packageName)
175
+ {
176
+ foreach (self::getInstalled() as $installed) {
177
+ if (!isset($installed['versions'][$packageName])) {
178
+ continue;
179
+ }
180
+
181
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
182
+ return null;
183
+ }
184
+
185
+ return $installed['versions'][$packageName]['pretty_version'];
186
+ }
187
+
188
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
189
+ }
190
+
191
+ /**
192
+ * @param string $packageName
193
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
194
+ */
195
+ public static function getReference($packageName)
196
+ {
197
+ foreach (self::getInstalled() as $installed) {
198
+ if (!isset($installed['versions'][$packageName])) {
199
+ continue;
200
+ }
201
+
202
+ if (!isset($installed['versions'][$packageName]['reference'])) {
203
+ return null;
204
+ }
205
+
206
+ return $installed['versions'][$packageName]['reference'];
207
+ }
208
+
209
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
210
+ }
211
+
212
+ /**
213
+ * @param string $packageName
214
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
215
+ */
216
+ public static function getInstallPath($packageName)
217
+ {
218
+ foreach (self::getInstalled() as $installed) {
219
+ if (!isset($installed['versions'][$packageName])) {
220
+ continue;
221
+ }
222
+
223
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
224
+ }
225
+
226
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
227
+ }
228
+
229
+ /**
230
+ * @return array
231
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
232
+ */
233
+ public static function getRootPackage()
234
+ {
235
+ $installed = self::getInstalled();
236
+
237
+ return $installed[0]['root'];
238
+ }
239
+
240
+ /**
241
+ * Returns the raw installed.php data for custom implementations
242
+ *
243
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
244
+ * @return array[]
245
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}
246
+ */
247
+ public static function getRawData()
248
+ {
249
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
250
+
251
+ if (null === self::$installed) {
252
+ // only require the installed.php file if this file is loaded from its dumped location,
253
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
254
+ if (substr(__DIR__, -8, 1) !== 'C') {
255
+ self::$installed = include __DIR__ . '/installed.php';
256
+ } else {
257
+ self::$installed = array();
258
+ }
259
+ }
260
+
261
+ return self::$installed;
262
+ }
263
+
264
+ /**
265
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
266
+ *
267
+ * @return array[]
268
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
269
+ */
270
+ public static function getAllRawData()
271
+ {
272
+ return self::getInstalled();
273
+ }
274
+
275
+ /**
276
+ * Lets you reload the static array from another file
277
+ *
278
+ * This is only useful for complex integrations in which a project needs to use
279
+ * this class but then also needs to execute another project's autoloader in process,
280
+ * and wants to ensure both projects have access to their version of installed.php.
281
+ *
282
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
283
+ * the data it needs from this class, then call reload() with
284
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
285
+ * the project in which it runs can then also use this class safely, without
286
+ * interference between PHPUnit's dependencies and the project's dependencies.
287
+ *
288
+ * @param array[] $data A vendor/composer/installed.php data set
289
+ * @return void
290
+ *
291
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data
292
+ */
293
+ public static function reload($data)
294
+ {
295
+ self::$installed = $data;
296
+ self::$installedByVendor = array();
297
+ }
298
+
299
+ /**
300
+ * @return array[]
301
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
302
+ */
303
+ private static function getInstalled()
304
+ {
305
+ if (null === self::$canGetVendors) {
306
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
307
+ }
308
+
309
+ $installed = array();
310
+
311
+ if (self::$canGetVendors) {
312
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
313
+ if (isset(self::$installedByVendor[$vendorDir])) {
314
+ $installed[] = self::$installedByVendor[$vendorDir];
315
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
316
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
317
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
318
+ self::$installed = $installed[count($installed) - 1];
319
+ }
320
+ }
321
+ }
322
+ }
323
+
324
+ if (null === self::$installed) {
325
+ // only require the installed.php file if this file is loaded from its dumped location,
326
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
327
+ if (substr(__DIR__, -8, 1) !== 'C') {
328
+ self::$installed = require __DIR__ . '/installed.php';
329
+ } else {
330
+ self::$installed = array();
331
+ }
332
+ }
333
+ $installed[] = self::$installed;
334
+
335
+ return $installed;
336
+ }
337
+ }
vendor/composer/autoload_classmap.php CHANGED
@@ -6,4 +6,5 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit4eb7cc5c69d78548ff291f7b4d963a73
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,17 @@ class ComposerAutoloaderInit4eb7cc5c69d78548ff291f7b4d963a73
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit4eb7cc5c69d78548ff291f7b4d963a73', 'loadClassLoader'), true, true);
26
- self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit4eb7cc5c69d78548ff291f7b4d963a73', '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\ComposerStaticInit4eb7cc5c69d78548ff291f7b4d963a73::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit0f0e14966061cbbec2a3562cf88406be
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ require __DIR__ . '/platform_check.php';
26
+
27
+ spl_autoload_register(array('ComposerAutoloaderInit0f0e14966061cbbec2a3562cf88406be', 'loadClassLoader'), true, true);
28
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit0f0e14966061cbbec2a3562cf88406be', '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\ComposerStaticInit0f0e14966061cbbec2a3562cf88406be::getInitializer($loader));
36
  } else {
37
  $map = require __DIR__ . '/autoload_namespaces.php';
38
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit4eb7cc5c69d78548ff291f7b4d963a73
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
@@ -30,12 +30,17 @@ class ComposerStaticInit4eb7cc5c69d78548ff291f7b4d963a73
30
  ),
31
  );
32
 
 
 
 
 
33
  public static function getInitializer(ClassLoader $loader)
34
  {
35
  return \Closure::bind(function () use ($loader) {
36
- $loader->prefixLengthsPsr4 = ComposerStaticInit4eb7cc5c69d78548ff291f7b4d963a73::$prefixLengthsPsr4;
37
- $loader->prefixDirsPsr4 = ComposerStaticInit4eb7cc5c69d78548ff291f7b4d963a73::$prefixDirsPsr4;
38
- $loader->prefixesPsr0 = ComposerStaticInit4eb7cc5c69d78548ff291f7b4d963a73::$prefixesPsr0;
 
39
 
40
  }, null, ClassLoader::class);
41
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit0f0e14966061cbbec2a3562cf88406be
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'B' =>
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 = ComposerStaticInit0f0e14966061cbbec2a3562cf88406be::$prefixLengthsPsr4;
41
+ $loader->prefixDirsPsr4 = ComposerStaticInit0f0e14966061cbbec2a3562cf88406be::$prefixDirsPsr4;
42
+ $loader->prefixesPsr0 = ComposerStaticInit0f0e14966061cbbec2a3562cf88406be::$prefixesPsr0;
43
+ $loader->classMap = ComposerStaticInit0f0e14966061cbbec2a3562cf88406be::$classMap;
44
 
45
  }, null, ClassLoader::class);
46
  }
vendor/composer/installed.json CHANGED
@@ -1,86 +1,92 @@
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.12",
58
- "version_normalized": "5.10.12.0",
59
- "source": {
60
- "type": "git",
61
- "url": "https://github.com/skyverge/wc-plugin-framework.git",
62
- "reference": "0c79b5799955c59e644caf1da222c20c982eba06"
63
- },
64
- "dist": {
65
- "type": "zip",
66
- "url": "https://api.github.com/repos/skyverge/wc-plugin-framework/zipball/0c79b5799955c59e644caf1da222c20c982eba06",
67
- "reference": "0c79b5799955c59e644caf1da222c20c982eba06",
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": "2022-01-14T03:01:10+00:00",
78
- "type": "library",
79
- "installation-source": "dist",
80
- "description": "The official SkyVerge WooCommerce plugin framework",
81
- "support": {
82
- "source": "https://github.com/skyverge/wc-plugin-framework/tree/5.10.12",
83
- "issues": "https://github.com/skyverge/wc-plugin-framework/issues"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  }
85
- }
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
+ "support": {
52
+ "issues": "https://github.com/braintree/braintree_php/issues",
53
+ "source": "https://github.com/braintree/braintree_php/tree/3.34.0"
54
+ },
55
+ "install-path": "../braintree/braintree_php"
56
  },
57
+ {
58
+ "name": "skyverge/wc-plugin-framework",
59
+ "version": "5.10.12",
60
+ "version_normalized": "5.10.12.0",
61
+ "source": {
62
+ "type": "git",
63
+ "url": "https://github.com/skyverge/wc-plugin-framework.git",
64
+ "reference": "0c79b5799955c59e644caf1da222c20c982eba06"
65
+ },
66
+ "dist": {
67
+ "type": "zip",
68
+ "url": "https://api.github.com/repos/skyverge/wc-plugin-framework/zipball/0c79b5799955c59e644caf1da222c20c982eba06",
69
+ "reference": "0c79b5799955c59e644caf1da222c20c982eba06",
70
+ "shasum": ""
71
+ },
72
+ "require-dev": {
73
+ "codeception/module-asserts": "^1.3",
74
+ "codeception/module-db": "^1.0",
75
+ "codeception/module-phpbrowser": "^1.0",
76
+ "lucatume/wp-browser": "3.0.5",
77
+ "phpcompatibility/php-compatibility": "9.3.5"
78
+ },
79
+ "time": "2022-01-14T03:01:10+00:00",
80
+ "type": "library",
81
+ "installation-source": "dist",
82
+ "description": "The official SkyVerge WooCommerce plugin framework",
83
+ "support": {
84
+ "source": "https://github.com/skyverge/wc-plugin-framework/tree/5.10.12",
85
+ "issues": "https://github.com/skyverge/wc-plugin-framework/issues"
86
+ },
87
+ "install-path": "../skyverge/wc-plugin-framework"
88
  }
89
+ ],
90
+ "dev": false,
91
+ "dev-package-names": []
92
+ }
vendor/composer/installed.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array(
2
+ 'root' => array(
3
+ 'pretty_version' => 'dev-trunk',
4
+ 'version' => 'dev-trunk',
5
+ 'type' => 'library',
6
+ 'install_path' => __DIR__ . '/../../',
7
+ 'aliases' => array(),
8
+ 'reference' => '14d2862855ad4cc59e23b9c2ccbf41fec0dd6d0e',
9
+ 'name' => '__root__',
10
+ 'dev' => false,
11
+ ),
12
+ 'versions' => array(
13
+ '__root__' => array(
14
+ 'pretty_version' => 'dev-trunk',
15
+ 'version' => 'dev-trunk',
16
+ 'type' => 'library',
17
+ 'install_path' => __DIR__ . '/../../',
18
+ 'aliases' => array(),
19
+ 'reference' => '14d2862855ad4cc59e23b9c2ccbf41fec0dd6d0e',
20
+ 'dev_requirement' => false,
21
+ ),
22
+ 'braintree/braintree_php' => array(
23
+ 'pretty_version' => '3.34.0',
24
+ 'version' => '3.34.0.0',
25
+ 'type' => 'library',
26
+ 'install_path' => __DIR__ . '/../braintree/braintree_php',
27
+ 'aliases' => array(),
28
+ 'reference' => 'fd55c466d0d0088c67705d7ba0b3876d9767bfda',
29
+ 'dev_requirement' => false,
30
+ ),
31
+ 'skyverge/wc-plugin-framework' => array(
32
+ 'pretty_version' => '5.10.12',
33
+ 'version' => '5.10.12.0',
34
+ 'type' => 'library',
35
+ 'install_path' => __DIR__ . '/../skyverge/wc-plugin-framework',
36
+ 'aliases' => array(),
37
+ 'reference' => '0c79b5799955c59e644caf1da222c20c982eba06',
38
+ 'dev_requirement' => false,
39
+ ),
40
+ ),
41
+ );
vendor/composer/platform_check.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // platform_check.php @generated by Composer
4
+
5
+ $issues = array();
6
+
7
+ if (!(PHP_VERSION_ID >= 50400)) {
8
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 5.4.0". You are running ' . PHP_VERSION . '.';
9
+ }
10
+
11
+ if ($issues) {
12
+ if (!headers_sent()) {
13
+ header('HTTP/1.1 500 Internal Server Error');
14
+ }
15
+ if (!ini_get('display_errors')) {
16
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
+ } elseif (!headers_sent()) {
19
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
+ }
21
+ }
22
+ trigger_error(
23
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
+ E_USER_ERROR
25
+ );
26
+ }
woocommerce-gateway-paypal-powered-by-braintree.php CHANGED
@@ -6,7 +6,7 @@
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.5
10
  * Text Domain: woocommerce-gateway-paypal-powered-by-braintree
11
  * Domain Path: /i18n/languages/
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.7.0
10
  * Text Domain: woocommerce-gateway-paypal-powered-by-braintree
11
  * Domain Path: /i18n/languages/
12
  *