Version Description
Download this release
Release Info
Developer | SkyVerge |
Plugin | Facebook for WooCommerce |
Version | 1.10.1 |
Comparing to | |
See all releases |
Code changes from version 1.10.0 to 1.10.1
- assets/js/admin/facebook-for-woocommerce-settings-sync.js +1 -2
- assets/js/admin/facebook-for-woocommerce-settings-sync.min.js +1 -1
- changelog.txt +4 -0
- class-wc-facebookcommerce.php +1 -1
- facebook-commerce.php +2 -12
- facebook-for-woocommerce.php +2 -2
- i18n/languages/facebook-for-woocommerce.pot +98 -91
- includes/Admin.php +13 -11
- includes/Lifecycle.php +64 -17
- includes/fbproductfeed.php +1 -1
- readme.txt +6 -2
assets/js/admin/facebook-for-woocommerce-settings-sync.js
CHANGED
@@ -9,9 +9,8 @@
|
|
9 |
|
10 |
jQuery( document ).ready( function( $ ) {
|
11 |
|
12 |
-
|
13 |
// run script only on Facebook Settings page
|
14 |
-
if ( '
|
15 |
return;
|
16 |
}
|
17 |
|
9 |
|
10 |
jQuery( document ).ready( function( $ ) {
|
11 |
|
|
|
12 |
// run script only on Facebook Settings page
|
13 |
+
if ( $( 'input[name="section"][value="facebookcommerce"]' ).closest( 'form' ).length === 0 ) {
|
14 |
return;
|
15 |
}
|
16 |
|
assets/js/admin/facebook-for-woocommerce-settings-sync.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";jQuery(document).ready(function(r){if("
|
1 |
+
"use strict";jQuery(document).ready(function(r){if(0!==r('input[name="section"][value="facebookcommerce"]').closest("form").length){r('input[type="checkbox"].toggle-fields-group').on("change",function(e){r(this).hasClass("product-sync-field")?o(r(".product-sync-field").not(".toggle-fields-group"),r(this).is(":checked")):r(this).hasClass("messenger-field")?o(r(".messenger-field").not(".toggle-fields-group"),r(this).is(":checked")):r(this).hasClass("resync-schedule-field")&&o(r(".resync-schedule-field").not(".toggle-fields-group"),r(this).is(":checked"))}).trigger("change"),r("#woocommerce_facebookcommerce_scheduled_resync_hours, #woocommerce_facebookcommerce_scheduled_resync_minutes").on("input change keyup keydown keypress click",function(){var e=r(this).val();!isNaN(e)&&1===e.length&&e<10&&r(this).val(e.padStart(2,"0"))}).trigger("change"),r("textarea#woocommerce_facebookcommerce_messenger_greeting").on("focus change keyup keydown keypress",function(){var e=parseInt(window.facebookAdsToolboxConfig.messengerGreetingMaxCharacters,10),o=r(this).val().length,c=r("span.characters-counter"),s=c.find("span");c.html(o+" / "+e+"<br/>").append(s).css("display","block"),e<o?c.css("color","#DC3232").find("span").show():c.css("color","#999999").find("span").hide()});var l=!1;r(".woocommerce-save-button").on("click",function(e){if(l)return!0;e.preventDefault();var o,c,s,n,t=r(this),i=(s=r("#woocommerce_facebookcommerce_fb_sync_exclude_categories").val(),n=[],window.facebookAdsToolboxConfig&&window.facebookAdsToolboxConfig.excludedCategoryIDs&&(n=window.facebookAdsToolboxConfig.excludedCategoryIDs),r(s).not(n).get()),a=(o=r("#woocommerce_facebookcommerce_fb_sync_exclude_tags").val(),c=[],window.facebookAdsToolboxConfig&&window.facebookAdsToolboxConfig.excludedTagIDs&&(c=window.facebookAdsToolboxConfig.excludedTagIDs),r(o).not(c).get());0<i.length||0<a.length?r.post(facebook_for_woocommerce_settings_sync.ajax_url,{action:"facebook_for_woocommerce_set_excluded_terms_prompt",security:facebook_for_woocommerce_settings_sync.set_excluded_terms_prompt_nonce,categories:i,tags:a},function(e){e&&!e.success?(r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:e.data}),r("#facebook-for-woocommerce-confirm-settings-change").on("click",function(){blockModal(),l=!0,t.trigger("click")})):(l=!0,t.trigger("click"))}):(l=!0,t.trigger("click"))})}function o(e,o){r(e).each(function(){var e=r(this);r(this).hasClass("wc-enhanced-select")&&(e=r(this).next("span.select2-container")),o?e.css("pointer-events","all").css("opacity","1.0"):e.css("pointer-events","none").css("opacity","0.4")})}});
|
changelog.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
*** Facebook for WooCommerce Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
3 |
2020.03.03 - version 1.10.0
|
4 |
* Feature - Exclude specific products, variations, product categories, and product tags from syncing to Facebook
|
5 |
* Feature - Add Facebook product settings like price and description to variations
|
1 |
*** Facebook for WooCommerce Changelog ***
|
2 |
|
3 |
+
2020.03.10 - version 1.10.1
|
4 |
+
* Fix - Prevent Fatal error during the upgrade routine introduced in version 1.10.0
|
5 |
+
* Fix - Only load the admin settings JavaScript on the Facebook settings page to prevent conflicts with other scripts
|
6 |
+
|
7 |
2020.03.03 - version 1.10.0
|
8 |
* Feature - Exclude specific products, variations, product categories, and product tags from syncing to Facebook
|
9 |
* Feature - Add Facebook product settings like price and description to variations
|
class-wc-facebookcommerce.php
CHANGED
@@ -19,7 +19,7 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
19 |
|
20 |
|
21 |
/** @var string the plugin version */
|
22 |
-
const VERSION = '1.10.
|
23 |
|
24 |
/** @var string for backwards compatibility TODO: remove this in v2.0.0 {CW 2020-02-06} */
|
25 |
const PLUGIN_VERSION = self::VERSION;
|
19 |
|
20 |
|
21 |
/** @var string the plugin version */
|
22 |
+
const VERSION = '1.10.1';
|
23 |
|
24 |
/** @var string for backwards compatibility TODO: remove this in v2.0.0 {CW 2020-02-06} */
|
25 |
const PLUGIN_VERSION = self::VERSION;
|
facebook-commerce.php
CHANGED
@@ -676,7 +676,7 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
676 |
* Load DIA specific JS Data
|
677 |
*/
|
678 |
public function load_assets() {
|
679 |
-
|
680 |
$ajax_data = array(
|
681 |
'nonce' => wp_create_nonce( 'wc_facebook_infobanner_jsx' ),
|
682 |
);
|
@@ -702,17 +702,7 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
702 |
)
|
703 |
);
|
704 |
|
705 |
-
if (
|
706 |
-
return;
|
707 |
-
}
|
708 |
-
|
709 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
710 |
-
if ( empty( $_GET['tab'] ) ) {
|
711 |
-
return;
|
712 |
-
}
|
713 |
-
|
714 |
-
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
715 |
-
if ( 'integration' !== $_GET['tab'] ) {
|
716 |
return;
|
717 |
}
|
718 |
|
676 |
* Load DIA specific JS Data
|
677 |
*/
|
678 |
public function load_assets() {
|
679 |
+
|
680 |
$ajax_data = array(
|
681 |
'nonce' => wp_create_nonce( 'wc_facebook_infobanner_jsx' ),
|
682 |
);
|
702 |
)
|
703 |
);
|
704 |
|
705 |
+
if ( ! facebook_for_woocommerce()->is_plugin_settings() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
return;
|
707 |
}
|
708 |
|
facebook-for-woocommerce.php
CHANGED
@@ -10,11 +10,11 @@
|
|
10 |
* 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.
|
11 |
* Author: Facebook
|
12 |
* Author URI: https://www.facebook.com/
|
13 |
-
* Version: 1.10.
|
14 |
* Woo: 2127297:0ea4fe4c2d7ca6338f8a322fb3e4e187
|
15 |
* Text Domain: facebook-for-woocommerce
|
16 |
* WC requires at least: 3.5.0
|
17 |
-
* WC tested up to:
|
18 |
*
|
19 |
* @package FacebookCommerce
|
20 |
*/
|
10 |
* 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.
|
11 |
* Author: Facebook
|
12 |
* Author URI: https://www.facebook.com/
|
13 |
+
* Version: 1.10.1
|
14 |
* Woo: 2127297:0ea4fe4c2d7ca6338f8a322fb3e4e187
|
15 |
* Text Domain: facebook-for-woocommerce
|
16 |
* WC requires at least: 3.5.0
|
17 |
+
* WC tested up to: 4.0.0
|
18 |
*
|
19 |
* @package FacebookCommerce
|
20 |
*/
|
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 1.10.
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://woocommerce.com/my-account/marketplace-ticket-form/\n"
|
8 |
-
"POT-Creation-Date: 2020-03-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -45,16 +45,16 @@ msgstr ""
|
|
45 |
msgid "This product is not yet synced to Facebook."
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: facebook-commerce.php:
|
49 |
msgid "Nothing to update for product group for %1$s"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: facebook-commerce.php:
|
53 |
#. translators: Placeholders %1$s - original error message from Facebook API
|
54 |
msgid "There was an issue connecting to the Facebook API: %1$s"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: facebook-commerce.php:
|
58 |
#. translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing
|
59 |
#. strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag
|
60 |
msgid ""
|
@@ -62,18 +62,18 @@ msgid ""
|
|
62 |
"configuration, %3$scomplete the setup steps%4$s."
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: facebook-commerce.php:
|
66 |
#. translators: Placeholders %1$s - WooCommerce version
|
67 |
msgid ""
|
68 |
"Facebook product sync may not work correctly in WooCommerce version %1$s. "
|
69 |
"Please upgrade to WooCommerce 3."
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: facebook-commerce.php:
|
73 |
msgid "Use Advanced Matching"
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: facebook-commerce.php:
|
77 |
#. translators: Placeholders: %1$s - opening <a> HTML link tag, %2$s - closing
|
78 |
#. </a> HTML link tag
|
79 |
msgid ""
|
@@ -82,158 +82,158 @@ msgid ""
|
|
82 |
"number). %1$sLearn more%2$s."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: facebook-commerce.php:
|
86 |
msgid "Enable product sync"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: facebook-commerce.php:
|
90 |
msgid "Exclude categories from sync"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: facebook-commerce.php:
|
94 |
msgid "Products in one or more of these categories will not sync to Facebook."
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: facebook-commerce.php:
|
98 |
msgid "Search for a product category…"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: facebook-commerce.php:
|
102 |
msgid "Exclude tags from sync"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: facebook-commerce.php:
|
106 |
msgid "Products with one or more of these tags will not sync to Facebook."
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: facebook-commerce.php:
|
110 |
msgid "Search for a product tag…"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: facebook-commerce.php:
|
114 |
msgid "Product description sync"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: facebook-commerce.php:
|
118 |
msgid "Choose which product description to display in the Facebook catalog."
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: facebook-commerce.php:
|
122 |
msgid "Standard description"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: facebook-commerce.php:
|
126 |
msgid "Short description"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: facebook-commerce.php:
|
130 |
msgid "Force daily resync at"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: facebook-commerce.php:
|
134 |
msgid "Messenger"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: facebook-commerce.php:
|
138 |
msgid "Enable Messenger"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: facebook-commerce.php:
|
142 |
msgid "Enable and customize Facebook Messenger on your store."
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: facebook-commerce.php:
|
146 |
msgid "Language"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: facebook-commerce.php:
|
150 |
msgid "Greeting"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: facebook-commerce.php:
|
154 |
msgid "Hi! We're here to answer any questions you may have."
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: facebook-commerce.php:
|
158 |
msgid "Colors"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: facebook-commerce.php:
|
162 |
msgid "Connection"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: facebook-commerce.php:
|
166 |
msgid "Manage connection"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: facebook-commerce.php:
|
170 |
msgid "Your connection has expired."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: facebook-commerce.php:
|
174 |
msgid ""
|
175 |
"Please click Manage connection > Advanced Options > Update Token to refresh "
|
176 |
"your connection to Facebook."
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: facebook-commerce.php:
|
180 |
msgid "Your access token has been updated."
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: facebook-commerce.php:
|
184 |
msgid "Please refresh the page."
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: facebook-commerce.php:
|
188 |
msgid "Facebook page"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: facebook-commerce.php:
|
192 |
msgid "Pixel"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: facebook-commerce.php:
|
196 |
msgid "Create ad"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: facebook-commerce.php:
|
200 |
msgid "Product sync"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: facebook-commerce.php:
|
204 |
msgid "Sync products"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: facebook-commerce.php:
|
208 |
msgid "am"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: facebook-commerce.php:
|
212 |
msgid "pm"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: facebook-commerce.php:
|
216 |
msgid "The greeting hasn't been updated."
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: facebook-commerce.php:
|
220 |
#. translators: Placeholder: %d - maximum number of allowed characters
|
221 |
msgid "The Messenger greeting must be %d characters or less."
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: facebook-commerce.php:
|
225 |
msgid "Facebook extension error: %s "
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: facebook-commerce.php:
|
229 |
msgid "Get started with Messenger Customer Chat"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: facebook-commerce.php:
|
233 |
msgid "Get started with Instagram Shopping"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: facebook-commerce.php:
|
237 |
msgid ""
|
238 |
"You're using Remove HTTP which has incompatibilities with our extension. "
|
239 |
"Please disable it, or select the \"Ignore external links\" option on the "
|
@@ -244,35 +244,35 @@ msgstr ""
|
|
244 |
msgid "Facebook"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: facebook-commerce.php:
|
248 |
msgid "Control how WooCommerce integrates with your Facebook store."
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: facebook-commerce.php:
|
252 |
msgid "Grow your business on Facebook"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: facebook-commerce.php:
|
256 |
msgid "Use this WooCommerce and Facebook integration to:"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: facebook-commerce.php:
|
260 |
msgid "Easily install a tracking pixel"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: facebook-commerce.php:
|
264 |
msgid "Upload your products and create a shop"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: facebook-commerce.php:
|
268 |
msgid "Create dynamic ads with your products and pixel"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: facebook-commerce.php:
|
272 |
msgid "Get Started"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: facebook-commerce.php:
|
276 |
#. translators: Placeholders %1$s - original error message from Facebook API
|
277 |
msgid "There was an issue connecting to the Facebook API: %s"
|
278 |
msgstr ""
|
@@ -343,73 +343,80 @@ msgid ""
|
|
343 |
"category / tag exclusion settings, click Cancel."
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: includes/Admin.php:
|
347 |
msgid "FB Sync Enabled"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: includes/Admin.php:
|
351 |
msgid "FB Catalog Visibility"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: includes/Admin.php:
|
355 |
msgid "Enabled"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: includes/Admin.php:
|
359 |
msgid "Disabled"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: includes/Admin.php:
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
#: includes/Admin.php:187
|
367 |
-
msgid "Product is synced and published (visible) on Facebook."
|
368 |
msgstr ""
|
369 |
|
370 |
#: includes/Admin.php:188
|
371 |
-
|
|
|
|
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: includes/Admin.php:
|
375 |
-
|
376 |
-
|
377 |
-
"
|
378 |
msgstr ""
|
379 |
|
380 |
#: includes/Admin.php:193
|
381 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: includes/Admin.php:
|
385 |
msgid "Show"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: includes/Admin.php:
|
389 |
msgid "Hide"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: includes/Admin.php:
|
393 |
msgid "Filter by Facebook sync setting"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: includes/Admin.php:
|
397 |
msgid "Facebook sync enabled"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: includes/Admin.php:
|
401 |
msgid "Facebook sync disabled"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: includes/Admin.php:
|
405 |
msgid "Include in Facebook sync"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: includes/Admin.php:
|
409 |
msgid "Exclude from Facebook sync"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: includes/Admin.php:
|
413 |
#. translators: Placeholders: %1$s - Facebook for Woocommerce, %2$s - opening
|
414 |
#. HTML <a> link tag, %3$s - closing HTML </a> link tag
|
415 |
msgid ""
|
@@ -418,61 +425,61 @@ msgid ""
|
|
418 |
"checkout URLs on Facebook%3$s."
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: includes/Admin.php:
|
422 |
msgid "Facebook Description"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: includes/Admin.php:
|
426 |
msgid ""
|
427 |
"Custom (plain-text only) description for product on Facebook. If blank, "
|
428 |
"product description will be used. If product description is blank, "
|
429 |
"shortname will be used."
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: includes/Admin.php:
|
433 |
msgid "Facebook Product Image"
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: includes/Admin.php:
|
437 |
msgid ""
|
438 |
"Choose the product image that should be synced to the Facebook catalog for "
|
439 |
"this product. If using a custom image, please enter an absolute URL (e.g. "
|
440 |
"https://domain.com/image.jpg)."
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: includes/Admin.php:
|
444 |
msgid "Use WooCommerce image"
|
445 |
msgstr ""
|
446 |
|
447 |
-
#: includes/Admin.php:
|
448 |
msgid "Use custom image"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: includes/Admin.php:
|
452 |
msgid "Custom Image URL"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: includes/Admin.php:
|
456 |
#. translators: Placeholders %1$s - WC currency symbol
|
457 |
msgid "Facebook Price (%1$s)"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: includes/Admin.php:
|
461 |
msgid ""
|
462 |
"Custom price for product on Facebook. Please enter in monetary decimal (.) "
|
463 |
"format without thousand separators and currency symbols. If blank, product "
|
464 |
"price will be used."
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: includes/Admin.php:
|
468 |
msgid "Use variation image"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: includes/Admin.php:
|
472 |
msgid "Use parent image"
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: includes/Admin.php:
|
476 |
msgid "Close modal panel"
|
477 |
msgstr ""
|
478 |
|
@@ -525,7 +532,7 @@ msgstr ""
|
|
525 |
msgid "https://www.facebook.com/"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: facebook-commerce-messenger-chat.php:258 facebook-commerce.php:
|
529 |
msgctxt "language"
|
530 |
msgid "English (United States)"
|
531 |
msgstr ""
|
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 1.10.1\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://woocommerce.com/my-account/marketplace-ticket-form/\n"
|
8 |
+
"POT-Creation-Date: 2020-03-10 20:01:44+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
45 |
msgid "This product is not yet synced to Facebook."
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: facebook-commerce.php:1278
|
49 |
msgid "Nothing to update for product group for %1$s"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: facebook-commerce.php:1675
|
53 |
#. translators: Placeholders %1$s - original error message from Facebook API
|
54 |
msgid "There was an issue connecting to the Facebook API: %1$s"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: facebook-commerce.php:1809
|
58 |
#. translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing
|
59 |
#. strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag
|
60 |
msgid ""
|
62 |
"configuration, %3$scomplete the setup steps%4$s."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: facebook-commerce.php:1828
|
66 |
#. translators: Placeholders %1$s - WooCommerce version
|
67 |
msgid ""
|
68 |
"Facebook product sync may not work correctly in WooCommerce version %1$s. "
|
69 |
"Please upgrade to WooCommerce 3."
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: facebook-commerce.php:2351
|
73 |
msgid "Use Advanced Matching"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: facebook-commerce.php:2354
|
77 |
#. translators: Placeholders: %1$s - opening <a> HTML link tag, %2$s - closing
|
78 |
#. </a> HTML link tag
|
79 |
msgid ""
|
82 |
"number). %1$sLearn more%2$s."
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: facebook-commerce.php:2374
|
86 |
msgid "Enable product sync"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: facebook-commerce.php:2382
|
90 |
msgid "Exclude categories from sync"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: facebook-commerce.php:2386
|
94 |
msgid "Products in one or more of these categories will not sync to Facebook."
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: facebook-commerce.php:2390
|
98 |
msgid "Search for a product category…"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: facebook-commerce.php:2395
|
102 |
msgid "Exclude tags from sync"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: facebook-commerce.php:2399
|
106 |
msgid "Products with one or more of these tags will not sync to Facebook."
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: facebook-commerce.php:2403
|
110 |
msgid "Search for a product tag…"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: facebook-commerce.php:2408
|
114 |
msgid "Product description sync"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: facebook-commerce.php:2411
|
118 |
msgid "Choose which product description to display in the Facebook catalog."
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: facebook-commerce.php:2414
|
122 |
msgid "Standard description"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: facebook-commerce.php:2415
|
126 |
msgid "Short description"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: facebook-commerce.php:2422
|
130 |
msgid "Force daily resync at"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: facebook-commerce.php:2428
|
134 |
msgid "Messenger"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: facebook-commerce.php:2433
|
138 |
msgid "Enable Messenger"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: facebook-commerce.php:2437
|
142 |
msgid "Enable and customize Facebook Messenger on your store."
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: facebook-commerce.php:2442
|
146 |
msgid "Language"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: facebook-commerce.php:2452
|
150 |
msgid "Greeting"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: facebook-commerce.php:2455
|
154 |
msgid "Hi! We're here to answer any questions you may have."
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: facebook-commerce.php:2463
|
158 |
msgid "Colors"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: facebook-commerce.php:2496
|
162 |
msgid "Connection"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: facebook-commerce.php:2503
|
166 |
msgid "Manage connection"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: facebook-commerce.php:2508
|
170 |
msgid "Your connection has expired."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: facebook-commerce.php:2510
|
174 |
msgid ""
|
175 |
"Please click Manage connection > Advanced Options > Update Token to refresh "
|
176 |
"your connection to Facebook."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: facebook-commerce.php:2516
|
180 |
msgid "Your access token has been updated."
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: facebook-commerce.php:2518
|
184 |
msgid "Please refresh the page."
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: facebook-commerce.php:2552
|
188 |
msgid "Facebook page"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: facebook-commerce.php:2616
|
192 |
msgid "Pixel"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: facebook-commerce.php:2662
|
196 |
msgid "Create ad"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: facebook-commerce.php:2691
|
200 |
msgid "Product sync"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: facebook-commerce.php:2697
|
204 |
msgid "Sync products"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: facebook-commerce.php:2837
|
208 |
msgid "am"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: facebook-commerce.php:2842
|
212 |
msgid "pm"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: facebook-commerce.php:2962
|
216 |
msgid "The greeting hasn't been updated."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: facebook-commerce.php:2981
|
220 |
#. translators: Placeholder: %d - maximum number of allowed characters
|
221 |
msgid "The Messenger greeting must be %d characters or less."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: facebook-commerce.php:3638
|
225 |
msgid "Facebook extension error: %s "
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: facebook-commerce.php:3748
|
229 |
msgid "Get started with Messenger Customer Chat"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: facebook-commerce.php:3749
|
233 |
msgid "Get started with Instagram Shopping"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: facebook-commerce.php:3799
|
237 |
msgid ""
|
238 |
"You're using Remove HTTP which has incompatibilities with our extension. "
|
239 |
"Please disable it, or select the \"Ignore external links\" option on the "
|
244 |
msgid "Facebook"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: facebook-commerce.php:3808
|
248 |
msgid "Control how WooCommerce integrates with your Facebook store."
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: facebook-commerce.php:3822
|
252 |
msgid "Grow your business on Facebook"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: facebook-commerce.php:3825
|
256 |
msgid "Use this WooCommerce and Facebook integration to:"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: facebook-commerce.php:3829
|
260 |
msgid "Easily install a tracking pixel"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: facebook-commerce.php:3830
|
264 |
msgid "Upload your products and create a shop"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: facebook-commerce.php:3831
|
268 |
msgid "Create dynamic ads with your products and pixel"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: facebook-commerce.php:3839
|
272 |
msgid "Get Started"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: facebook-commerce.php:3992
|
276 |
#. translators: Placeholders %1$s - original error message from Facebook API
|
277 |
msgid "There was an issue connecting to the Facebook API: %s"
|
278 |
msgstr ""
|
343 |
"category / tag exclusion settings, click Cancel."
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: includes/Admin.php:132
|
347 |
msgid "FB Sync Enabled"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: includes/Admin.php:133
|
351 |
msgid "FB Catalog Visibility"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: includes/Admin.php:156
|
355 |
msgid "Enabled"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: includes/Admin.php:158
|
359 |
msgid "Disabled"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: includes/Admin.php:176
|
363 |
+
#. translators: Points to a product that was never synced with Facebook
|
364 |
+
msgid "Never synced with Facebook."
|
|
|
|
|
|
|
365 |
msgstr ""
|
366 |
|
367 |
#: includes/Admin.php:188
|
368 |
+
#. translators: Action to hide a product (currently synced with Facebook) from
|
369 |
+
#. the Facebook catalog
|
370 |
+
msgid "Hide from Facebook catalog. Currently synced with Facebook."
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: includes/Admin.php:190
|
374 |
+
#. translators: Action to publish a product (currently synced with Facebook) in
|
375 |
+
#. the Facebook catalog
|
376 |
+
msgid "Publish in Facebook catalog. Currently synced with Facebook."
|
377 |
msgstr ""
|
378 |
|
379 |
#: includes/Admin.php:193
|
380 |
+
#. translators: Action to hide a product (currently not synced with Facebook)
|
381 |
+
#. from the Facebook catalog
|
382 |
+
msgid "Hide from Facebook catalog. Not synced with Facebook."
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: includes/Admin.php:195
|
386 |
+
#. translators: Action to publish a product (currently not synced with
|
387 |
+
#. Facebook) in the Facebook catalog
|
388 |
+
msgid "Publish in Facebook catalog. Not synced with Facebook."
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: includes/Admin.php:206
|
392 |
msgid "Show"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: includes/Admin.php:214
|
396 |
msgid "Hide"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: includes/Admin.php:242
|
400 |
msgid "Filter by Facebook sync setting"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: includes/Admin.php:243
|
404 |
msgid "Facebook sync enabled"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: includes/Admin.php:244
|
408 |
msgid "Facebook sync disabled"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: includes/Admin.php:403 includes/Admin.php:552 includes/Admin.php:644
|
412 |
msgid "Include in Facebook sync"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: includes/Admin.php:404
|
416 |
msgid "Exclude from Facebook sync"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: includes/Admin.php:491
|
420 |
#. translators: Placeholders: %1$s - Facebook for Woocommerce, %2$s - opening
|
421 |
#. HTML <a> link tag, %3$s - closing HTML </a> link tag
|
422 |
msgid ""
|
425 |
"checkout URLs on Facebook%3$s."
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: includes/Admin.php:558 includes/Admin.php:653
|
429 |
msgid "Facebook Description"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: includes/Admin.php:560 includes/Admin.php:655
|
433 |
msgid ""
|
434 |
"Custom (plain-text only) description for product on Facebook. If blank, "
|
435 |
"product description will be used. If product description is blank, "
|
436 |
"shortname will be used."
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: includes/Admin.php:569 includes/Admin.php:666
|
440 |
msgid "Facebook Product Image"
|
441 |
msgstr ""
|
442 |
|
443 |
+
#: includes/Admin.php:571 includes/Admin.php:668
|
444 |
msgid ""
|
445 |
"Choose the product image that should be synced to the Facebook catalog for "
|
446 |
"this product. If using a custom image, please enter an absolute URL (e.g. "
|
447 |
"https://domain.com/image.jpg)."
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: includes/Admin.php:573
|
451 |
msgid "Use WooCommerce image"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: includes/Admin.php:574 includes/Admin.php:672
|
455 |
msgid "Use custom image"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: includes/Admin.php:583 includes/Admin.php:682
|
459 |
msgid "Custom Image URL"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: includes/Admin.php:592 includes/Admin.php:693
|
463 |
#. translators: Placeholders %1$s - WC currency symbol
|
464 |
msgid "Facebook Price (%1$s)"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: includes/Admin.php:596 includes/Admin.php:697
|
468 |
msgid ""
|
469 |
"Custom price for product on Facebook. Please enter in monetary decimal (.) "
|
470 |
"format without thousand separators and currency symbols. If blank, product "
|
471 |
"price will be used."
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: includes/Admin.php:670
|
475 |
msgid "Use variation image"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/Admin.php:671
|
479 |
msgid "Use parent image"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: includes/Admin.php:802
|
483 |
msgid "Close modal panel"
|
484 |
msgstr ""
|
485 |
|
532 |
msgid "https://www.facebook.com/"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: facebook-commerce-messenger-chat.php:258 facebook-commerce.php:2327
|
536 |
msgctxt "language"
|
537 |
msgid "English (United States)"
|
538 |
msgstr ""
|
includes/Admin.php
CHANGED
@@ -80,12 +80,11 @@ class Admin {
|
|
80 |
$modal_screens = [
|
81 |
'product',
|
82 |
'edit-product',
|
83 |
-
'woocommerce_page_wc-settings',
|
84 |
];
|
85 |
|
86 |
if ( isset( $current_screen->id ) ) {
|
87 |
|
88 |
-
if ( in_array( $current_screen->id, $modal_screens ) ) {
|
89 |
|
90 |
// enqueue modal functions
|
91 |
wp_enqueue_script( 'facebook-for-woocommerce-modal', plugins_url( '/facebook-for-woocommerce/assets/js/facebook-for-woocommerce-modal.min.js' ), [ 'jquery', 'wc-backbone-modal', 'jquery-blockui' ], \WC_Facebookcommerce::PLUGIN_VERSION );
|
@@ -105,7 +104,7 @@ class Admin {
|
|
105 |
] );
|
106 |
}
|
107 |
|
108 |
-
if (
|
109 |
|
110 |
wp_enqueue_script( 'facebook-for-woocommerce-settings-sync', plugins_url( '/facebook-for-woocommerce/assets/js/admin/facebook-for-woocommerce-settings-sync.min.js' ), [ 'jquery', 'wc-backbone-modal', 'jquery-blockui', 'facebook-for-woocommerce-modal' ], \WC_Facebookcommerce::PLUGIN_VERSION );
|
111 |
|
@@ -172,7 +171,9 @@ class Admin {
|
|
172 |
<span
|
173 |
class="facebook-for-woocommerce-product-visibility-toggle"
|
174 |
style="cursor:default;"
|
175 |
-
title="<?php
|
|
|
|
|
176 |
>–</span>
|
177 |
<?php
|
178 |
|
@@ -183,14 +184,15 @@ class Admin {
|
|
183 |
$is_hidden = ! $is_visible;
|
184 |
|
185 |
if ( $is_sync_enabled ) {
|
186 |
-
|
187 |
-
$visible_tooltip_text = __( '
|
188 |
-
|
189 |
-
|
190 |
} else {
|
191 |
-
|
192 |
-
$visible_tooltip_text = __( '
|
193 |
-
|
|
|
194 |
}
|
195 |
|
196 |
?>
|
80 |
$modal_screens = [
|
81 |
'product',
|
82 |
'edit-product',
|
|
|
83 |
];
|
84 |
|
85 |
if ( isset( $current_screen->id ) ) {
|
86 |
|
87 |
+
if ( in_array( $current_screen->id, $modal_screens ) || facebook_for_woocommerce()->is_plugin_settings() ) {
|
88 |
|
89 |
// enqueue modal functions
|
90 |
wp_enqueue_script( 'facebook-for-woocommerce-modal', plugins_url( '/facebook-for-woocommerce/assets/js/facebook-for-woocommerce-modal.min.js' ), [ 'jquery', 'wc-backbone-modal', 'jquery-blockui' ], \WC_Facebookcommerce::PLUGIN_VERSION );
|
104 |
] );
|
105 |
}
|
106 |
|
107 |
+
if ( facebook_for_woocommerce()->is_plugin_settings() ) {
|
108 |
|
109 |
wp_enqueue_script( 'facebook-for-woocommerce-settings-sync', plugins_url( '/facebook-for-woocommerce/assets/js/admin/facebook-for-woocommerce-settings-sync.min.js' ), [ 'jquery', 'wc-backbone-modal', 'jquery-blockui', 'facebook-for-woocommerce-modal' ], \WC_Facebookcommerce::PLUGIN_VERSION );
|
110 |
|
171 |
<span
|
172 |
class="facebook-for-woocommerce-product-visibility-toggle"
|
173 |
style="cursor:default;"
|
174 |
+
title="<?php
|
175 |
+
/* translators: Points to a product that was never synced with Facebook */
|
176 |
+
esc_attr_e( 'Never synced with Facebook.', 'facebook-for-woocommerce' ); ?>"
|
177 |
>–</span>
|
178 |
<?php
|
179 |
|
184 |
$is_hidden = ! $is_visible;
|
185 |
|
186 |
if ( $is_sync_enabled ) {
|
187 |
+
/* translators: Action to hide a product (currently synced with Facebook) from the Facebook catalog */
|
188 |
+
$visible_tooltip_text = __( 'Hide from Facebook catalog. Currently synced with Facebook.', 'facebook-for-woocommerce' );
|
189 |
+
/* translators: Action to publish a product (currently synced with Facebook) in the Facebook catalog */
|
190 |
+
$hidden_tooltip_text = __( 'Publish in Facebook catalog. Currently synced with Facebook.', 'facebook-for-woocommerce' );
|
191 |
} else {
|
192 |
+
/* translators: Action to hide a product (currently not synced with Facebook) from the Facebook catalog */
|
193 |
+
$visible_tooltip_text = __( 'Hide from Facebook catalog. Not synced with Facebook.', 'facebook-for-woocommerce' );
|
194 |
+
/* translators: Action to publish a product (currently not synced with Facebook) in the Facebook catalog */
|
195 |
+
$hidden_tooltip_text = __( 'Publish in Facebook catalog. Not synced with Facebook.', 'facebook-for-woocommerce' );
|
196 |
}
|
197 |
|
198 |
?>
|
includes/Lifecycle.php
CHANGED
@@ -37,6 +37,7 @@ class Lifecycle extends Framework\Plugin\Lifecycle {
|
|
37 |
|
38 |
$this->upgrade_versions = [
|
39 |
'1.10.0',
|
|
|
40 |
];
|
41 |
}
|
42 |
|
@@ -66,9 +67,26 @@ class Lifecycle extends Framework\Plugin\Lifecycle {
|
|
66 |
*/
|
67 |
protected function upgrade_to_1_10_0() {
|
68 |
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
$values = get_option( 'woocommerce_facebookcommerce_settings', [] );
|
71 |
-
|
|
|
|
|
|
|
|
|
72 |
|
73 |
// migrate options from woocommerce_facebookcommerce_settings
|
74 |
$options = [
|
@@ -82,22 +100,27 @@ class Lifecycle extends Framework\Plugin\Lifecycle {
|
|
82 |
|
83 |
foreach ( $options as $old_index => $new_option_name ) {
|
84 |
|
85 |
-
if ( isset( $values[ $old_index ] ) ) {
|
86 |
|
87 |
$new_value = $values[ $old_index ];
|
88 |
|
89 |
if ( 'pixel_install_time' === $old_index ) {
|
90 |
|
91 |
// convert to UTC timestamp
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
update_option( $new_option_name, $new_value );
|
97 |
}
|
98 |
}
|
99 |
|
100 |
-
$new_settings = [];
|
101 |
|
102 |
// migrate settings from woocommerce_facebookcommerce_settings
|
103 |
$settings = [
|
@@ -112,45 +135,69 @@ class Lifecycle extends Framework\Plugin\Lifecycle {
|
|
112 |
|
113 |
foreach ( $settings as $old_index => $new_index ) {
|
114 |
|
115 |
-
if ( isset( $values[ $old_index ] ) ) {
|
116 |
$new_settings[ $new_index ] = $values[ $old_index ];
|
117 |
}
|
118 |
}
|
119 |
|
120 |
// migrate settings from standalone options
|
121 |
-
|
|
|
|
|
122 |
|
123 |
-
|
124 |
-
|
125 |
|
126 |
-
|
|
|
|
|
127 |
|
128 |
-
if ( !
|
129 |
|
130 |
-
$
|
|
|
|
|
131 |
|
132 |
if ( false !== $parsed_time ) {
|
133 |
|
134 |
$midnight = ( new \DateTime() )->setTimestamp( $parsed_time )->setTime( 0, 0, 0 );
|
135 |
|
136 |
$resync_offset = $parsed_time - $midnight->getTimestamp();
|
137 |
-
|
138 |
-
$new_settings[ \WC_Facebookcommerce_Integration::SETTING_SCHEDULED_RESYNC_OFFSET ] = $resync_offset;
|
139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
update_option( 'woocommerce_' . \WC_Facebookcommerce::INTEGRATION_ID . '_settings', $new_settings );
|
143 |
|
144 |
// schedule the next product resync action
|
145 |
-
if (
|
146 |
|
147 |
$integration = $this->get_plugin()->get_integration();
|
148 |
|
149 |
if ( ! $integration->is_resync_scheduled() ) {
|
150 |
-
$integration->schedule_resync( $
|
151 |
}
|
152 |
}
|
153 |
}
|
154 |
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
37 |
|
38 |
$this->upgrade_versions = [
|
39 |
'1.10.0',
|
40 |
+
'1.10.1',
|
41 |
];
|
42 |
}
|
43 |
|
67 |
*/
|
68 |
protected function upgrade_to_1_10_0() {
|
69 |
|
70 |
+
$this->migrate_1_9_settings();
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Migrates Facebook for WooCommerce options used in version 1.9.x to the options and settings used in 1.10.x.
|
76 |
+
*
|
77 |
+
* Some users who upgraded from 1.9.x to 1.10.0 ended up with an incomplete upgrade and could have configured the plugin from scratch after that.
|
78 |
+
* This routine will update the options and settings only if a previous value does not exists.
|
79 |
+
*
|
80 |
+
* @since 1.10.1
|
81 |
+
*/
|
82 |
+
private function migrate_1_9_settings() {
|
83 |
+
|
84 |
$values = get_option( 'woocommerce_facebookcommerce_settings', [] );
|
85 |
+
|
86 |
+
// preserve legacy values
|
87 |
+
if ( false === get_option( 'woocommerce_facebookcommerce_legacy_settings' ) ) {
|
88 |
+
update_option( 'woocommerce_facebookcommerce_legacy_settings', $values );
|
89 |
+
}
|
90 |
|
91 |
// migrate options from woocommerce_facebookcommerce_settings
|
92 |
$options = [
|
100 |
|
101 |
foreach ( $options as $old_index => $new_option_name ) {
|
102 |
|
103 |
+
if ( isset( $values[ $old_index ] ) && false === get_option( $new_option_name ) ) {
|
104 |
|
105 |
$new_value = $values[ $old_index ];
|
106 |
|
107 |
if ( 'pixel_install_time' === $old_index ) {
|
108 |
|
109 |
// convert to UTC timestamp
|
110 |
+
try {
|
111 |
+
$pixel_install_time = \DateTime::createFromFormat( 'Y-m-d G:i:s', $new_value, new \DateTimeZone( wc_timezone_string() ) );
|
112 |
+
} catch ( \Exception $e ) {
|
113 |
+
$pixel_install_time = false;
|
114 |
+
}
|
115 |
+
|
116 |
+
$new_value = $pixel_install_time instanceof \DateTime ? $pixel_install_time->getTimestamp() : null;
|
117 |
}
|
118 |
|
119 |
update_option( $new_option_name, $new_value );
|
120 |
}
|
121 |
}
|
122 |
|
123 |
+
$new_settings = get_option( 'woocommerce_' . \WC_Facebookcommerce::INTEGRATION_ID . '_settings', [] );
|
124 |
|
125 |
// migrate settings from woocommerce_facebookcommerce_settings
|
126 |
$settings = [
|
135 |
|
136 |
foreach ( $settings as $old_index => $new_index ) {
|
137 |
|
138 |
+
if ( isset( $values[ $old_index ] ) && ! isset( $new_settings[ $new_index ] ) ) {
|
139 |
$new_settings[ $new_index ] = $values[ $old_index ];
|
140 |
}
|
141 |
}
|
142 |
|
143 |
// migrate settings from standalone options
|
144 |
+
if ( ! isset( $new_settings[ \WC_Facebookcommerce_Integration::SETTING_ENABLE_PRODUCT_SYNC ] ) ) {
|
145 |
+
|
146 |
+
$product_sync_enabled = empty( get_option( 'fb_disable_sync_on_dev_environment', 0 ) );
|
147 |
|
148 |
+
$new_settings[ \WC_Facebookcommerce_Integration::SETTING_ENABLE_PRODUCT_SYNC ] = $product_sync_enabled ? 'yes' : 'no';
|
149 |
+
}
|
150 |
|
151 |
+
if ( ! isset( $new_settings[ \WC_Facebookcommerce_Integration::SETTING_PRODUCT_DESCRIPTION_MODE ] ) ) {
|
152 |
+
$new_settings[ \WC_Facebookcommerce_Integration::SETTING_PRODUCT_DESCRIPTION_MODE ] = ! empty( get_option( 'fb_sync_short_description', 0 ) ) ? \WC_Facebookcommerce_Integration::PRODUCT_DESCRIPTION_MODE_SHORT : \WC_Facebookcommerce_Integration::PRODUCT_DESCRIPTION_MODE_STANDARD;
|
153 |
+
}
|
154 |
|
155 |
+
if ( ! isset( $new_settings[ \WC_Facebookcommerce_Integration::SETTING_SCHEDULED_RESYNC_OFFSET ] ) ) {
|
156 |
|
157 |
+
$autosync_time = get_option( 'woocommerce_fb_autosync_time' );
|
158 |
+
$parsed_time = ! empty( $autosync_time ) ? strtotime( $autosync_time ) : false;
|
159 |
+
$resync_offset = null;
|
160 |
|
161 |
if ( false !== $parsed_time ) {
|
162 |
|
163 |
$midnight = ( new \DateTime() )->setTimestamp( $parsed_time )->setTime( 0, 0, 0 );
|
164 |
|
165 |
$resync_offset = $parsed_time - $midnight->getTimestamp();
|
|
|
|
|
166 |
}
|
167 |
+
|
168 |
+
$new_settings[ \WC_Facebookcommerce_Integration::SETTING_SCHEDULED_RESYNC_OFFSET ] = $resync_offset;
|
169 |
+
}
|
170 |
+
|
171 |
+
// maybe remove old settings entries
|
172 |
+
$old_indexes = array_merge( array_keys( $options ), array_keys( $settings ), [ 'fb_settings_heading', 'fb_upload_id', 'upload_end_time' ] );
|
173 |
+
|
174 |
+
foreach ( $old_indexes as $old_index ) {
|
175 |
+
unset( $new_settings[ $old_index ] );
|
176 |
}
|
177 |
|
178 |
update_option( 'woocommerce_' . \WC_Facebookcommerce::INTEGRATION_ID . '_settings', $new_settings );
|
179 |
|
180 |
// schedule the next product resync action
|
181 |
+
if ( $new_settings[ \WC_Facebookcommerce_Integration::SETTING_SCHEDULED_RESYNC_OFFSET ] && 'yes' === $new_settings[ \WC_Facebookcommerce_Integration::SETTING_ENABLE_PRODUCT_SYNC ] ) {
|
182 |
|
183 |
$integration = $this->get_plugin()->get_integration();
|
184 |
|
185 |
if ( ! $integration->is_resync_scheduled() ) {
|
186 |
+
$integration->schedule_resync( $new_settings[ \WC_Facebookcommerce_Integration::SETTING_SCHEDULED_RESYNC_OFFSET ] );
|
187 |
}
|
188 |
}
|
189 |
}
|
190 |
|
191 |
|
192 |
+
/**
|
193 |
+
* Upgrades to version 1.10.1.
|
194 |
+
*
|
195 |
+
* @since 1.10.1
|
196 |
+
*/
|
197 |
+
protected function upgrade_to_1_10_1() {
|
198 |
+
|
199 |
+
$this->migrate_1_9_settings();
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
}
|
includes/fbproductfeed.php
CHANGED
@@ -267,7 +267,7 @@ if ( ! class_exists( 'WC_Facebook_Product_Feed' ) ) :
|
|
267 |
// log simple product
|
268 |
if ( ! isset( $product_data['default_product'] ) ) {
|
269 |
$this->no_default_product_count++;
|
270 |
-
$product_data['default_product'];
|
271 |
}
|
272 |
|
273 |
return $product_data['retailer_id'] . ',' .
|
267 |
// log simple product
|
268 |
if ( ! isset( $product_data['default_product'] ) ) {
|
269 |
$this->no_default_product_count++;
|
270 |
+
$product_data['default_product'] = '';
|
271 |
}
|
272 |
|
273 |
return $product_data['retailer_id'] . ',' .
|
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.
|
6 |
-
Stable tag: 1.10.
|
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 |
= 2020.03.03 - version 1.10.0 =
|
43 |
* Feature - Exclude specific products, variations, product categories, and product tags from syncing to Facebook
|
44 |
* Feature - Add Facebook product settings like price and description to variations
|
2 |
Contributors: facebook, automattic, woothemes
|
3 |
Tags: facebook, shop, catalog, advertise, pixel, product
|
4 |
Requires at least: 4.4
|
5 |
+
Tested up to: 5.3.2
|
6 |
+
Stable tag: 1.10.1
|
7 |
Requires PHP: 5.6 or greater
|
8 |
MySQL: 5.6 or greater
|
9 |
License: GPLv2 or later
|
39 |
|
40 |
== Changelog ==
|
41 |
|
42 |
+
= 2020.03.10 - version 1.10.1
|
43 |
+
* Fix - Prevent Fatal error during the upgrade routine introduced in version 1.10.0
|
44 |
+
* Fix - Only load the admin settings JavaScript on the Facebook settings page to prevent conflicts with other scripts
|
45 |
+
|
46 |
= 2020.03.03 - version 1.10.0 =
|
47 |
* Feature - Exclude specific products, variations, product categories, and product tags from syncing to Facebook
|
48 |
* Feature - Add Facebook product settings like price and description to variations
|