Version Description
- 2022-11-09 =
- Fix - Add backward compatibility for WC 6.1, 6.2, and 6.3 versions.
- Fix - Sync product set when the term name changes.
Download this release
Release Info
Developer | automattic |
Plugin | Facebook for WooCommerce |
Version | 2.6.30 |
Comparing to | |
See all releases |
Code changes from version 2.6.29 to 2.6.30
- changelog.txt +4 -0
- facebook-for-woocommerce.php +2 -2
- i18n/languages/facebook-for-woocommerce.pot +2 -2
- includes/Admin/Tasks/Setup.php +13 -0
- includes/ProductSets/Sync.php +22 -2
- readme.txt +5 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +6 -6
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
*** Facebook for WooCommerce Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
3 |
= 2.6.29 - 2022-11-08 =
|
4 |
* Add - Facebook Product Set under the Marketing menu.
|
5 |
* Add - HPOS Compatibility.
|
1 |
*** Facebook for WooCommerce Changelog ***
|
2 |
|
3 |
+
= 2.6.30 - 2022-11-09 =
|
4 |
+
* Fix - Add backward compatibility for WC 6.1, 6.2, and 6.3 versions.
|
5 |
+
* Fix - Sync product set when the term name changes.
|
6 |
+
|
7 |
= 2.6.29 - 2022-11-08 =
|
8 |
* Add - Facebook Product Set under the Marketing menu.
|
9 |
* Add - HPOS Compatibility.
|
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.
|
15 |
* Text Domain: facebook-for-woocommerce
|
16 |
* Tested up to: 6.1
|
17 |
* WC requires at least: 5.3
|
@@ -44,7 +44,7 @@ class WC_Facebook_Loader {
|
|
44 |
/**
|
45 |
* @var string the plugin version. This must be in the main plugin file to be automatically bumped by Woorelease.
|
46 |
*/
|
47 |
-
const PLUGIN_VERSION = '2.6.
|
48 |
|
49 |
// Minimum PHP version required by this plugin.
|
50 |
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.30
|
15 |
* Text Domain: facebook-for-woocommerce
|
16 |
* Tested up to: 6.1
|
17 |
* WC requires at least: 5.3
|
44 |
/**
|
45 |
* @var string the plugin version. This must be in the main plugin file to be automatically bumped by Woorelease.
|
46 |
*/
|
47 |
+
const PLUGIN_VERSION = '2.6.30'; // WRCS: DEFINED_VERSION.
|
48 |
|
49 |
// Minimum PHP version required by this plugin.
|
50 |
const MINIMUM_PHP_VERSION = '7.0.0';
|
i18n/languages/facebook-for-woocommerce.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the Facebook for WooCommerce plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Facebook for WooCommerce 2.6.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/facebook-for-woocommerce\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-11-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
"X-Domain: facebook-for-woocommerce\n"
|
2 |
# This file is distributed under the same license as the Facebook for WooCommerce plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Facebook for WooCommerce 2.6.30\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/facebook-for-woocommerce\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-11-09T04:20:40+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.5.0\n"
|
15 |
"X-Domain: facebook-for-woocommerce\n"
|
includes/Admin/Tasks/Setup.php
CHANGED
@@ -71,4 +71,17 @@ class Setup extends Task {
|
|
71 |
public function is_complete() {
|
72 |
return facebook_for_woocommerce()->get_connection_handler()->is_connected();
|
73 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
71 |
public function is_complete() {
|
72 |
return facebook_for_woocommerce()->get_connection_handler()->is_connected();
|
73 |
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Parent ID. This method is abstract in WooCommerce 6.1.x, 6.2.x and 6.3.x. This implementation is for backward compatibility for these versions.
|
77 |
+
*
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function get_parent_id() {
|
81 |
+
if ( is_callable( 'parent::get_parent_id' ) ) {
|
82 |
+
return parent::get_parent_id();
|
83 |
+
}
|
84 |
+
|
85 |
+
return 'extended'; // The parent task list id.
|
86 |
+
}
|
87 |
}
|
includes/ProductSets/Sync.php
CHANGED
@@ -71,6 +71,15 @@ class Sync {
|
|
71 |
*/
|
72 |
protected static $prev_product_set = array();
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
/**
|
75 |
* Product's Product Set New List
|
76 |
*
|
@@ -80,6 +89,15 @@ class Sync {
|
|
80 |
*/
|
81 |
protected static $new_product_set = array();
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
/**
|
84 |
* Categories field name
|
85 |
*
|
@@ -122,7 +140,7 @@ class Sync {
|
|
122 |
// product set hooks, compare taxonomies the lists before and after saving product to see if must sync
|
123 |
add_action( 'created_fb_product_set', array( $this, 'fb_product_set_hook_before' ), 1 );
|
124 |
add_action( 'created_fb_product_set', array( $this, 'fb_product_set_hook_after' ), 99 );
|
125 |
-
add_action( '
|
126 |
add_action( 'edited_fb_product_set', array( $this, 'fb_product_set_hook_after' ), 99 );
|
127 |
|
128 |
// product cat and product set delete hooks, remove or check if must remove any product set
|
@@ -240,6 +258,7 @@ class Sync {
|
|
240 |
*/
|
241 |
public function fb_product_set_hook_before( $term_id ) {
|
242 |
self::$prev_product_cat = get_term_meta( $term_id, $this->categories_field, true );
|
|
|
243 |
}
|
244 |
|
245 |
|
@@ -252,7 +271,8 @@ class Sync {
|
|
252 |
*/
|
253 |
public function fb_product_set_hook_after( $term_id ) {
|
254 |
self::$new_product_cat = get_term_meta( $term_id, $this->categories_field, true );
|
255 |
-
|
|
|
256 |
$this->maybe_sync_product_set( $term_id );
|
257 |
}
|
258 |
}
|
71 |
*/
|
72 |
protected static $prev_product_set = array();
|
73 |
|
74 |
+
/**
|
75 |
+
* Product's Product Set Previous Name
|
76 |
+
*
|
77 |
+
* @since 2.6.30
|
78 |
+
*
|
79 |
+
* @var string
|
80 |
+
*/
|
81 |
+
protected static $prev_product_name = "";
|
82 |
+
|
83 |
/**
|
84 |
* Product's Product Set New List
|
85 |
*
|
89 |
*/
|
90 |
protected static $new_product_set = array();
|
91 |
|
92 |
+
/**
|
93 |
+
* Product's Product Set New Name
|
94 |
+
*
|
95 |
+
* @since 2.6.30
|
96 |
+
*
|
97 |
+
* @var string
|
98 |
+
*/
|
99 |
+
protected static $new_product_name = "";
|
100 |
+
|
101 |
/**
|
102 |
* Categories field name
|
103 |
*
|
140 |
// product set hooks, compare taxonomies the lists before and after saving product to see if must sync
|
141 |
add_action( 'created_fb_product_set', array( $this, 'fb_product_set_hook_before' ), 1 );
|
142 |
add_action( 'created_fb_product_set', array( $this, 'fb_product_set_hook_after' ), 99 );
|
143 |
+
add_action( 'edit_fb_product_set', array( $this, 'fb_product_set_hook_before' ), 1 );
|
144 |
add_action( 'edited_fb_product_set', array( $this, 'fb_product_set_hook_after' ), 99 );
|
145 |
|
146 |
// product cat and product set delete hooks, remove or check if must remove any product set
|
258 |
*/
|
259 |
public function fb_product_set_hook_before( $term_id ) {
|
260 |
self::$prev_product_cat = get_term_meta( $term_id, $this->categories_field, true );
|
261 |
+
self::$prev_product_name = get_term( $term_id )->name;
|
262 |
}
|
263 |
|
264 |
|
271 |
*/
|
272 |
public function fb_product_set_hook_after( $term_id ) {
|
273 |
self::$new_product_cat = get_term_meta( $term_id, $this->categories_field, true );
|
274 |
+
self::$new_product_name = get_term( $term_id )->name;
|
275 |
+
if ( ! empty( $this->get_all_diff( 'product_cat' ) ) || self::$prev_product_name !== self::$new_product_name ) {
|
276 |
$this->maybe_sync_product_set( $term_id );
|
277 |
}
|
278 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: facebook, automattic, woothemes
|
|
3 |
Tags: facebook, shop, catalog, advertise, pixel, product
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 6.1
|
6 |
-
Stable tag: 2.6.
|
7 |
Requires PHP: 5.6 or greater
|
8 |
MySQL: 5.6 or greater
|
9 |
License: GPLv2 or later
|
@@ -39,6 +39,10 @@ When opening a bug on GitHub, please give us as many details as possible.
|
|
39 |
|
40 |
== Changelog ==
|
41 |
|
|
|
|
|
|
|
|
|
42 |
= 2.6.29 - 2022-11-08 =
|
43 |
* Add - Facebook Product Set under the Marketing menu.
|
44 |
* Add - HPOS Compatibility.
|
3 |
Tags: facebook, shop, catalog, advertise, pixel, product
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 6.1
|
6 |
+
Stable tag: 2.6.30
|
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.30 - 2022-11-09 =
|
43 |
+
* Fix - Add backward compatibility for WC 6.1, 6.2, and 6.3 versions.
|
44 |
+
* Fix - Sync product set when the term name changes.
|
45 |
+
|
46 |
= 2.6.29 - 2022-11-08 =
|
47 |
* Add - Facebook Product Set under the Marketing menu.
|
48 |
* Add - HPOS Compatibility.
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInitc7a38d3b9056d61c05392a953f2bba96::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,12 +24,12 @@ class ComposerAutoloaderInitc7e9be46944d9c79c6ae24f716f83948
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
-
call_user_func(\Composer\Autoload\
|
33 |
|
34 |
$loader->register(true);
|
35 |
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitc7a38d3b9056d61c05392a953f2bba96
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInitc7a38d3b9056d61c05392a953f2bba96', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitc7a38d3b9056d61c05392a953f2bba96', 'loadClassLoader'));
|
30 |
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitc7a38d3b9056d61c05392a953f2bba96::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
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
@@ -245,9 +245,9 @@ class ComposerStaticInitc7e9be46944d9c79c6ae24f716f83948
|
|
245 |
public static function getInitializer(ClassLoader $loader)
|
246 |
{
|
247 |
return \Closure::bind(function () use ($loader) {
|
248 |
-
$loader->prefixLengthsPsr4 =
|
249 |
-
$loader->prefixDirsPsr4 =
|
250 |
-
$loader->classMap =
|
251 |
|
252 |
}, null, ClassLoader::class);
|
253 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitc7a38d3b9056d61c05392a953f2bba96
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'S' =>
|
245 |
public static function getInitializer(ClassLoader $loader)
|
246 |
{
|
247 |
return \Closure::bind(function () use ($loader) {
|
248 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitc7a38d3b9056d61c05392a953f2bba96::$prefixLengthsPsr4;
|
249 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitc7a38d3b9056d61c05392a953f2bba96::$prefixDirsPsr4;
|
250 |
+
$loader->classMap = ComposerStaticInitc7a38d3b9056d61c05392a953f2bba96::$classMap;
|
251 |
|
252 |
}, null, ClassLoader::class);
|
253 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'facebookincubator/facebook-for-woocommerce',
|
4 |
-
'pretty_version' => 'dev-
|
5 |
-
'version' => 'dev-
|
6 |
-
'reference' => '
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
@@ -20,9 +20,9 @@
|
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'facebookincubator/facebook-for-woocommerce' => array(
|
23 |
-
'pretty_version' => 'dev-
|
24 |
-
'version' => 'dev-
|
25 |
-
'reference' => '
|
26 |
'type' => 'wordpress-plugin',
|
27 |
'install_path' => __DIR__ . '/../../',
|
28 |
'aliases' => array(),
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'facebookincubator/facebook-for-woocommerce',
|
4 |
+
'pretty_version' => 'dev-release/2.6.30',
|
5 |
+
'version' => 'dev-release/2.6.30',
|
6 |
+
'reference' => '26ee0f8590597b20893f64d839a65f11ebc64b45',
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'facebookincubator/facebook-for-woocommerce' => array(
|
23 |
+
'pretty_version' => 'dev-release/2.6.30',
|
24 |
+
'version' => 'dev-release/2.6.30',
|
25 |
+
'reference' => '26ee0f8590597b20893f64d839a65f11ebc64b45',
|
26 |
'type' => 'wordpress-plugin',
|
27 |
'install_path' => __DIR__ . '/../../',
|
28 |
'aliases' => array(),
|