Facebook for WooCommerce - Version 2.6.21

Version Description

  • 2022-08-16 =
  • Dev - Add branch-labels GH workflow.
  • Fix - Undefined array key "HTTP_REFERER" not longer happens when new Event is triggered from an AJAX call that doesn't include a referrer (likely due to browser configuration).
  • Tweak - WC 6.8 compatibility.
  • Tweak - WP 6.0 compatibility.
Download this release

Release Info

Developer automattic
Plugin Icon Facebook for WooCommerce
Version 2.6.21
Comparing to
See all releases

Code changes from version 2.6.20 to 2.6.21

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  *** Facebook for WooCommerce Changelog ***
2
 
 
 
 
 
 
 
3
  2022-08-09 - version 2.6.20
4
  * Fix - Ensure product is deleted from FB when moved to trash.
5
  * Fix - Price not updating when the sale price is removed.
1
  *** Facebook for WooCommerce Changelog ***
2
 
3
+ = 2.6.21 - 2022-08-16 =
4
+ * Dev - Add branch-labels GH workflow.
5
+ * Fix - `Undefined array key "HTTP_REFERER"` not longer happens when `new Event` is triggered from an AJAX call that doesn't include a referrer (likely due to browser configuration).
6
+ * Tweak - WC 6.8 compatibility.
7
+ * Tweak - WP 6.0 compatibility.
8
+
9
  2022-08-09 - version 2.6.20
10
  * Fix - Ensure product is deleted from FB when moved to trash.
11
  * Fix - Price not updating when the sale price is removed.
facebook-for-woocommerce.php CHANGED
@@ -11,7 +11,7 @@
11
  * Description: Grow your business on Facebook! Use this official plugin to help sell more of your products using Facebook. After completing the setup, you'll be ready to create ads that promote your products and you can also create a shop section on your Page where customers can browse your products on Facebook.
12
  * Author: Facebook
13
  * Author URI: https://www.facebook.com/
14
- * Version: 2.6.20
15
  * Text Domain: facebook-for-woocommerce
16
  * Tested up to: 6.0
17
  * WC requires at least: 3.5.0
@@ -33,7 +33,7 @@ class WC_Facebook_Loader {
33
  /**
34
  * @var string the plugin version. This must be in the main plugin file to be automatically bumped by Woorelease.
35
  */
36
- const PLUGIN_VERSION = '2.6.20'; // WRCS: DEFINED_VERSION.
37
 
38
  // Minimum PHP version required by this plugin.
39
  const MINIMUM_PHP_VERSION = '7.0.0';
11
  * Description: Grow your business on Facebook! Use this official plugin to help sell more of your products using Facebook. After completing the setup, you'll be ready to create ads that promote your products and you can also create a shop section on your Page where customers can browse your products on Facebook.
12
  * Author: Facebook
13
  * Author URI: https://www.facebook.com/
14
+ * Version: 2.6.21
15
  * Text Domain: facebook-for-woocommerce
16
  * Tested up to: 6.0
17
  * WC requires at least: 3.5.0
33
  /**
34
  * @var string the plugin version. This must be in the main plugin file to be automatically bumped by Woorelease.
35
  */
36
+ const PLUGIN_VERSION = '2.6.21'; // WRCS: DEFINED_VERSION.
37
 
38
  // Minimum PHP version required by this plugin.
39
  const MINIMUM_PHP_VERSION = '7.0.0';
i18n/languages/facebook-for-woocommerce.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the Facebook for WooCommerce package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Facebook for WooCommerce 2.6.20\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
- "POT-Creation-Date: 2022-08-09 07:32:02+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the Facebook for WooCommerce package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Facebook for WooCommerce 2.6.21\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
+ "POT-Creation-Date: 2022-08-16 14:20:59+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
includes/Events/Event.php CHANGED
@@ -215,7 +215,7 @@ class Event {
215
 
216
  if ( wp_doing_ajax() ) {
217
 
218
- $url = $_SERVER['HTTP_REFERER'];
219
 
220
  } else {
221
 
215
 
216
  if ( wp_doing_ajax() ) {
217
 
218
+ $url = wp_get_raw_referer();
219
 
220
  } else {
221
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: facebook, automattic, woothemes
3
  Tags: facebook, shop, catalog, advertise, pixel, product
4
  Requires at least: 4.4
5
- Tested up to: 5.9
6
- Stable tag: 2.6.20
7
  Requires PHP: 5.6 or greater
8
  MySQL: 5.6 or greater
9
  License: GPLv2 or later
@@ -39,6 +39,12 @@ When opening a bug on GitHub, please give us as many details as possible.
39
 
40
  == Changelog ==
41
 
 
 
 
 
 
 
42
  = 2.6.20 - 2022-08-09 =
43
  * Fix - Ensure product is deleted from FB when moved to trash.
44
  * Fix - Price not updating when the sale price is removed.
2
  Contributors: facebook, automattic, woothemes
3
  Tags: facebook, shop, catalog, advertise, pixel, product
4
  Requires at least: 4.4
5
+ Tested up to: 6.0
6
+ Stable tag: 2.6.21
7
  Requires PHP: 5.6 or greater
8
  MySQL: 5.6 or greater
9
  License: GPLv2 or later
39
 
40
  == Changelog ==
41
 
42
+ = 2.6.21 - 2022-08-16 =
43
+ * Dev - Add branch-labels GH workflow.
44
+ * Fix - `Undefined array key "HTTP_REFERER"` not longer happens when `new Event` is triggered from an AJAX call that doesn't include a referrer (likely due to browser configuration).
45
+ * Tweak - WC 6.8 compatibility.
46
+ * Tweak - WP 6.0 compatibility.
47
+
48
  = 2.6.20 - 2022-08-09 =
49
  * Fix - Ensure product is deleted from FB when moved to trash.
50
  * Fix - Price not updating when the sale price is removed.
vendor/autoload.php CHANGED
@@ -2,6 +2,11 @@
2
 
3
  // autoload.php @generated by Composer
4
 
 
 
 
 
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit1517540bf9067c79d56f0c7f9de23319::getLoader();
2
 
3
  // autoload.php @generated by Composer
4
 
5
+ if (PHP_VERSION_ID < 50600) {
6
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
7
+ exit(1);
8
+ }
9
+
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInit6cf87926df5764f388edcae91bf125c2::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -149,7 +149,7 @@ class ClassLoader
149
 
150
  /**
151
  * @return string[] Array of classname => path
152
- * @psalm-var array<string, string>
153
  */
154
  public function getClassMap()
155
  {
149
 
150
  /**
151
  * @return string[] Array of classname => path
152
+ * @psalm-return array<string, string>
153
  */
154
  public function getClassMap()
155
  {
vendor/composer/InstalledVersions.php CHANGED
@@ -21,11 +21,26 @@ use Composer\Semver\VersionParser;
21
  * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
  *
23
  * To require its 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
  /**
21
  * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
  *
23
  * To require its presence, you can require `composer-runtime-api ^2.0`
24
+ *
25
+ * @final
26
  */
27
  class InstalledVersions
28
  {
29
+ /**
30
+ * @var mixed[]|null
31
+ * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
32
+ */
33
  private static $installed;
34
+
35
+ /**
36
+ * @var bool|null
37
+ */
38
  private static $canGetVendors;
39
+
40
+ /**
41
+ * @var array[]
42
+ * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
43
+ */
44
  private static $installedByVendor = array();
45
 
46
  /**
vendor/composer/autoload_classmap.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_namespaces.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_psr4.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit1517540bf9067c79d56f0c7f9de23319
6
  {
7
  private static $loader;
8
 
@@ -24,31 +24,12 @@ class ComposerAutoloaderInit1517540bf9067c79d56f0c7f9de23319
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
- spl_autoload_register(array('ComposerAutoloaderInit1517540bf9067c79d56f0c7f9de23319', 'loadClassLoader'), true, true);
28
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
29
- spl_autoload_unregister(array('ComposerAutoloaderInit1517540bf9067c79d56f0c7f9de23319', '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\ComposerStaticInit1517540bf9067c79d56f0c7f9de23319::getInitializer($loader));
36
- } else {
37
- $map = require __DIR__ . '/autoload_namespaces.php';
38
- foreach ($map as $namespace => $path) {
39
- $loader->set($namespace, $path);
40
- }
41
-
42
- $map = require __DIR__ . '/autoload_psr4.php';
43
- foreach ($map as $namespace => $path) {
44
- $loader->setPsr4($namespace, $path);
45
- }
46
-
47
- $classMap = require __DIR__ . '/autoload_classmap.php';
48
- if ($classMap) {
49
- $loader->addClassMap($classMap);
50
- }
51
- }
52
 
53
  $loader->register(true);
54
 
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit6cf87926df5764f388edcae91bf125c2
6
  {
7
  private static $loader;
8
 
24
 
25
  require __DIR__ . '/platform_check.php';
26
 
27
+ spl_autoload_register(array('ComposerAutoloaderInit6cf87926df5764f388edcae91bf125c2', 'loadClassLoader'), true, true);
28
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
29
+ spl_autoload_unregister(array('ComposerAutoloaderInit6cf87926df5764f388edcae91bf125c2', 'loadClassLoader'));
30
+
31
+ require __DIR__ . '/autoload_static.php';
32
+ call_user_func(\Composer\Autoload\ComposerStaticInit6cf87926df5764f388edcae91bf125c2::getInitializer($loader));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  $loader->register(true);
35
 
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit1517540bf9067c79d56f0c7f9de23319
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
@@ -43,9 +43,9 @@ class ComposerStaticInit1517540bf9067c79d56f0c7f9de23319
43
  public static function getInitializer(ClassLoader $loader)
44
  {
45
  return \Closure::bind(function () use ($loader) {
46
- $loader->prefixLengthsPsr4 = ComposerStaticInit1517540bf9067c79d56f0c7f9de23319::$prefixLengthsPsr4;
47
- $loader->prefixDirsPsr4 = ComposerStaticInit1517540bf9067c79d56f0c7f9de23319::$prefixDirsPsr4;
48
- $loader->classMap = ComposerStaticInit1517540bf9067c79d56f0c7f9de23319::$classMap;
49
 
50
  }, null, ClassLoader::class);
51
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit6cf87926df5764f388edcae91bf125c2
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'S' =>
43
  public static function getInitializer(ClassLoader $loader)
44
  {
45
  return \Closure::bind(function () use ($loader) {
46
+ $loader->prefixLengthsPsr4 = ComposerStaticInit6cf87926df5764f388edcae91bf125c2::$prefixLengthsPsr4;
47
+ $loader->prefixDirsPsr4 = ComposerStaticInit6cf87926df5764f388edcae91bf125c2::$prefixDirsPsr4;
48
+ $loader->classMap = ComposerStaticInit6cf87926df5764f388edcae91bf125c2::$classMap;
49
 
50
  }, null, ClassLoader::class);
51
  }
vendor/composer/installed.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php return array(
2
  'root' => array(
3
- 'pretty_version' => 'dev-release/2.6.20',
4
- 'version' => 'dev-release/2.6.20',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => 'e04ab485da38910010771c873a37ca939e2ed346',
9
  'name' => 'facebookincubator/facebook-for-woocommerce',
10
  'dev' => false,
11
  ),
@@ -20,12 +20,12 @@
20
  'dev_requirement' => false,
21
  ),
22
  'facebookincubator/facebook-for-woocommerce' => array(
23
- 'pretty_version' => 'dev-release/2.6.20',
24
- 'version' => 'dev-release/2.6.20',
25
  'type' => 'wordpress-plugin',
26
  'install_path' => __DIR__ . '/../../',
27
  'aliases' => array(),
28
- 'reference' => 'e04ab485da38910010771c873a37ca939e2ed346',
29
  'dev_requirement' => false,
30
  ),
31
  'roundcube/plugin-installer' => array(
1
  <?php return array(
2
  'root' => array(
3
+ 'pretty_version' => 'dev-release/2.6.21',
4
+ 'version' => 'dev-release/2.6.21',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => 'b4be34aafdb924f7e60a54601a1dac22a2af0d63',
9
  'name' => 'facebookincubator/facebook-for-woocommerce',
10
  'dev' => false,
11
  ),
20
  'dev_requirement' => false,
21
  ),
22
  'facebookincubator/facebook-for-woocommerce' => array(
23
+ 'pretty_version' => 'dev-release/2.6.21',
24
+ 'version' => 'dev-release/2.6.21',
25
  'type' => 'wordpress-plugin',
26
  'install_path' => __DIR__ . '/../../',
27
  'aliases' => array(),
28
+ 'reference' => 'b4be34aafdb924f7e60a54601a1dac22a2af0d63',
29
  'dev_requirement' => false,
30
  ),
31
  'roundcube/plugin-installer' => array(