Version Description
Added advanced WooCommerce logging
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 6.0.0 |
Comparing to | |
See all releases |
Code changes from version 5.0.0 to 6.0.0
- TODO.txt +11 -18
- classes/channels/class-compari_ro.php +117 -0
- classes/channels/class-facebook_drm.php +11 -0
- classes/channels/class-glami.php +107 -0
- classes/channels/class-google_product_review.php +37 -48
- classes/channels/class-google_shopping.php +22 -1
- classes/channels/class-heureka.php +25 -0
- classes/channels/class-pinterest.php +350 -0
- classes/channels/class-pricecheck.php +261 -0
- classes/channels/class-ricardo.php +275 -0
- classes/channels/class-shopmania_ro.php +92 -0
- classes/channels/class-zbozi.php +25 -0
- classes/class-activate.php +64 -23
- classes/class-admin-notifications.php +19 -15
- classes/class-attributes.php +26 -15
- classes/class-get-products.php +595 -192
- classes/class-update-channel.php +9 -0
- js/woosea_autocomplete.js +4 -3
- js/woosea_field_mapping.js +5 -1
- js/woosea_key.js +1 -3
- js/woosea_manage.js +38 -0
- js/woosea_rules.js +57 -2
- js/woosea_validation.js +0 -3
- pages/admin/woosea-generate-feed-step-0.php +55 -48
- pages/admin/woosea-generate-feed-step-1.php +32 -31
- pages/admin/woosea-generate-feed-step-4.php +11 -11
- pages/admin/woosea-generate-feed-step-5.php +11 -9
- pages/admin/woosea-generate-feed-step-7.php +33 -8
- pages/admin/woosea-generate-feed-step-9.php +144 -0
- pages/admin/woosea-key.php +2 -2
- pages/admin/woosea-manage-feed.php +73 -53
- pages/admin/woosea-manage-settings.php +93 -51
- pages/admin/woosea-statistics-feed.php +2 -2
- pages/admin/woosea-upgrade-elite.php +2 -2
- readme.txt +648 -8
- woocommerce-sea.php +937 -163
TODO.txt
CHANGED
@@ -1,30 +1,23 @@
|
|
1 |
So you found my to-do list for this plugin? Well, hope you enjoy the little sneak preview of what's coming.
|
2 |
Missing some features you might like? Drop me a line at support@adtribes.io and we might just add it to the list. Thanks!
|
3 |
|
4 |
-
|
5 |
-
-
|
6 |
-
-
|
7 |
-
-
|
8 |
-
|
9 |
-
|
10 |
-
- Add support for Google Product Review feeds
|
11 |
-
- Add support for Google Actions: https://support.google.com/merchants/answer/7378924
|
12 |
- Add possibility to create OR rules
|
|
|
|
|
13 |
- Change root XML node for custom feeds
|
14 |
-
|
15 |
-
|
16 |
-
OTHER ISSUES:
|
17 |
-
- Add a CSV upload feature (or UI) for filling the woosea attributes, both for simple and variation products
|
18 |
-
- Add hierarchy category dropdown in filters/rules (exclude on identical subcategory names removes all)
|
19 |
- Build a better WP Cron check, current one is not good enough
|
20 |
-
- Add
|
21 |
- Remarketing tags not yet on thank-you purchase page
|
22 |
- Incomplete remarketing tag on cart-page
|
23 |
-
- Tracking & conversion
|
24 |
-
- dynamic dropdowns in GA / tracking page for values
|
25 |
- Add support for Composite products: https://woocommerce.com/products/composite-products/ & https://yithemes.com/themes/plugins/yith-woocommerce-composite-products/
|
26 |
-
- Add support for Bundled products: https://woocommerce.com/products/product-bundles/
|
27 |
-
- Add more complex rules based on more than just 1 condition (AND)
|
28 |
- Add localisation (at least for nl_NL and nl_BE / fr_BE) - https://codex.wordpress.org/I18n_for_WordPress_Developers#Translating_Plugins_and_Themes
|
29 |
- AMAZON integration:
|
30 |
- requires a professional seller account, 39 dollar a month, before being able to create a developer account
|
1 |
So you found my to-do list for this plugin? Well, hope you enjoy the little sneak preview of what's coming.
|
2 |
Missing some features you might like? Drop me a line at support@adtribes.io and we might just add it to the list. Thanks!
|
3 |
|
4 |
+
Priority issues:
|
5 |
+
- Google category mapping functie is langzaam!
|
6 |
+
- Do not use server time as update time in the feed but local time settings
|
7 |
+
- Add g:tax support: https://support.google.com/merchants/answer/6324454?hl=en&ref_topic=6324338
|
8 |
+
- Add support for Danish Guloggratis.dk: https://www.guloggratis.dk/modules/gg_ad_import/documentation/public/?categoryId=447
|
9 |
+
- Add support for Polish Ceneo.pl: https://shops.ceneo.pl/documents/Informacje%20na%20temat%20struktury%20pliku%20xml.pdf
|
|
|
|
|
10 |
- Add possibility to create OR rules
|
11 |
+
- Add brand and mpn/gtin to product structured data: https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fwww.bol.com%2Fnl%2Fp%2Flogitech-g903-lightspeed-draadloze-gamingmuis%2F9200000079253509%2F
|
12 |
+
- Add support for Google Actions: https://support.google.com/merchants/answer/7378924
|
13 |
- Change root XML node for custom feeds
|
14 |
+
- Add Zbozi / Heureka category taxonomy support
|
15 |
+
- Add Ricardo.ch category taxonomy support
|
|
|
|
|
|
|
16 |
- Build a better WP Cron check, current one is not good enough
|
17 |
+
- Add hierarchy category dropdown in filters/rules (exclude on identical subcategory names removes all)
|
18 |
- Remarketing tags not yet on thank-you purchase page
|
19 |
- Incomplete remarketing tag on cart-page
|
|
|
|
|
20 |
- Add support for Composite products: https://woocommerce.com/products/composite-products/ & https://yithemes.com/themes/plugins/yith-woocommerce-composite-products/
|
|
|
|
|
21 |
- Add localisation (at least for nl_NL and nl_BE / fr_BE) - https://codex.wordpress.org/I18n_for_WordPress_Developers#Translating_Plugins_and_Themes
|
22 |
- AMAZON integration:
|
23 |
- requires a professional seller account, 39 dollar a month, before being able to create a developer account
|
classes/channels/class-compari_ro.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings for Compari Romania feeds
|
4 |
+
*/
|
5 |
+
class WooSEA_compari_ro {
|
6 |
+
public $compari_ro;
|
7 |
+
|
8 |
+
public static function get_channel_attributes() {
|
9 |
+
|
10 |
+
$sitename = get_option('blogname');
|
11 |
+
|
12 |
+
$compari_ro = array(
|
13 |
+
"Feed fields" => array(
|
14 |
+
"productid" => array(
|
15 |
+
"name" => "productid",
|
16 |
+
"feed_name" => "productid",
|
17 |
+
"format" => "required",
|
18 |
+
"woo_suggest" => "id",
|
19 |
+
),
|
20 |
+
"manufacturer" => array(
|
21 |
+
"name" => "manufacturer",
|
22 |
+
"feed_name" => "manufacturer",
|
23 |
+
"format" => "required",
|
24 |
+
),
|
25 |
+
"name" => array(
|
26 |
+
"name" => "name",
|
27 |
+
"feed_name" => "name",
|
28 |
+
"format" => "required",
|
29 |
+
"woo_suggest" => "title",
|
30 |
+
),
|
31 |
+
"category" => array(
|
32 |
+
"name" => "category",
|
33 |
+
"feed_name" => "category",
|
34 |
+
"format" => "required",
|
35 |
+
"woo_suggest" => "categories",
|
36 |
+
),
|
37 |
+
"product_url" => array(
|
38 |
+
"name" => "product_url",
|
39 |
+
"feed_name" => "product_url",
|
40 |
+
"format" => "required",
|
41 |
+
"woo_suggest" => "link",
|
42 |
+
),
|
43 |
+
"price" => array(
|
44 |
+
"name" => "price",
|
45 |
+
"feed_name" => "price",
|
46 |
+
"format" => "required",
|
47 |
+
"woo_suggest" => "price",
|
48 |
+
),
|
49 |
+
"identifier" => array(
|
50 |
+
"name" => "identifier",
|
51 |
+
"feed_name" => "identifier",
|
52 |
+
"format" => "required",
|
53 |
+
),
|
54 |
+
"image_url" => array(
|
55 |
+
"name" => "image_url",
|
56 |
+
"feed_name" => "image_url",
|
57 |
+
"format" => "optional",
|
58 |
+
"woo_suggest" => "image",
|
59 |
+
),
|
60 |
+
"image_url_2" => array(
|
61 |
+
"name" => "image_url_2",
|
62 |
+
"feed_name" => "image_url_2",
|
63 |
+
"format" => "optional",
|
64 |
+
),
|
65 |
+
"image_url_3" => array(
|
66 |
+
"name" => "image_url_3",
|
67 |
+
"feed_name" => "image_url_3",
|
68 |
+
"format" => "optional",
|
69 |
+
),
|
70 |
+
"description" => array(
|
71 |
+
"name" => "description",
|
72 |
+
"feed_name" => "description",
|
73 |
+
"format" => "optional",
|
74 |
+
"woo_suggest" => "description",
|
75 |
+
),
|
76 |
+
"delivery_time" => array(
|
77 |
+
"name" => "delivery_time",
|
78 |
+
"feed_name" => "delivery_time",
|
79 |
+
"format" => "optional",
|
80 |
+
),
|
81 |
+
"delivery_cost" => array(
|
82 |
+
"name" => "delivery_cost",
|
83 |
+
"feed_name" => "delivery_cost",
|
84 |
+
"format" => "optional",
|
85 |
+
),
|
86 |
+
"EAN_code" => array(
|
87 |
+
"name" => "EAN_code",
|
88 |
+
"feed_name" => "EAN_code",
|
89 |
+
"format" => "optional",
|
90 |
+
),
|
91 |
+
"net_price" => array(
|
92 |
+
"name" => "net_price",
|
93 |
+
"feed_name" => "net_price",
|
94 |
+
"format" => "optional",
|
95 |
+
),
|
96 |
+
"color" => array(
|
97 |
+
"name" => "color",
|
98 |
+
"feed_name" => "color",
|
99 |
+
"format" => "optional",
|
100 |
+
),
|
101 |
+
"size" => array(
|
102 |
+
"name" => "size",
|
103 |
+
"feed_name" => "size",
|
104 |
+
"format" => "optional",
|
105 |
+
),
|
106 |
+
"GroupId" => array(
|
107 |
+
"name" => "GroupId",
|
108 |
+
"feed_name" => "GroupId",
|
109 |
+
"format" => "optional",
|
110 |
+
"woo_suggest" => "item_group_id",
|
111 |
+
),
|
112 |
+
),
|
113 |
+
);
|
114 |
+
return $compari_ro;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
?>
|
classes/channels/class-facebook_drm.php
CHANGED
@@ -131,6 +131,17 @@ class WooSEA_facebook_drm {
|
|
131 |
"format" => "optional",
|
132 |
"woo_suggest" => "categories",
|
133 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
"sale_price" => array(
|
135 |
"name" => "sale_price",
|
136 |
"feed_name" => "g:sale_price",
|
131 |
"format" => "optional",
|
132 |
"woo_suggest" => "categories",
|
133 |
),
|
134 |
+
"offer_price" => array(
|
135 |
+
"name" => "offer_price",
|
136 |
+
"feed_name" => "g:offer_price",
|
137 |
+
"format" => "optional",
|
138 |
+
"woo_suggest" => "offer_price",
|
139 |
+
),
|
140 |
+
"offer_price_effective_date" => array(
|
141 |
+
"name" => "offer_price_effective_date",
|
142 |
+
"feed_name" => "g:offer_price_effective_date",
|
143 |
+
"format" => "optional",
|
144 |
+
),
|
145 |
"sale_price" => array(
|
146 |
"name" => "sale_price",
|
147 |
"feed_name" => "g:sale_price",
|
classes/channels/class-glami.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings for Glami feeds
|
4 |
+
*/
|
5 |
+
class WooSEA_glami {
|
6 |
+
public $glami;
|
7 |
+
|
8 |
+
public static function get_channel_attributes() {
|
9 |
+
|
10 |
+
$sitename = get_option('blogname');
|
11 |
+
|
12 |
+
$glami = array(
|
13 |
+
"Feed fields" => array(
|
14 |
+
"ITEM_ID" => array(
|
15 |
+
"name" => "ITEM_ID",
|
16 |
+
"feed_name" => "ITEM_ID",
|
17 |
+
"format" => "required",
|
18 |
+
"woo_suggest" => "id",
|
19 |
+
),
|
20 |
+
"ITEMGROUP_ID" => array(
|
21 |
+
"name" => "ITEMGROUP_ID",
|
22 |
+
"feed_name" => "ITEMGROUP_ID",
|
23 |
+
"format" => "optional",
|
24 |
+
"woo_suggest" => "item_group_id",
|
25 |
+
),
|
26 |
+
"PRODUCTNAME" => array(
|
27 |
+
"name" => "PRODUCTNAME",
|
28 |
+
"feed_name" => "PRODUCTNAME",
|
29 |
+
"format" => "required",
|
30 |
+
"woo_suggest" => "title",
|
31 |
+
),
|
32 |
+
"DESCRIPTION" => array(
|
33 |
+
"name" => "DESCRIPTION",
|
34 |
+
"feed_name" => "DESCRIPTION",
|
35 |
+
"format" => "required",
|
36 |
+
"woo_suggest" => "description",
|
37 |
+
),
|
38 |
+
"URL" => array(
|
39 |
+
"name" => "URL",
|
40 |
+
"feed_name" => "URL",
|
41 |
+
"format" => "required",
|
42 |
+
"woo_suggest" => "link",
|
43 |
+
),
|
44 |
+
"URL_SIZE" => array(
|
45 |
+
"name" => "URL_SIZE",
|
46 |
+
"feed_name" => "URL_SIZE",
|
47 |
+
"format" => "optional",
|
48 |
+
),
|
49 |
+
"IMGURL" => array(
|
50 |
+
"name" => "IMGURL",
|
51 |
+
"feed_name" => "IMGURL",
|
52 |
+
"format" => "required",
|
53 |
+
"woo_suggest" => "image",
|
54 |
+
),
|
55 |
+
"IMGURL_ALTERNATIVE" => array(
|
56 |
+
"name" => "IMGURL_ALTERNATIVE",
|
57 |
+
"feed_name" => "IMGURL_ALTERNATIVE",
|
58 |
+
"format" => "optional",
|
59 |
+
),
|
60 |
+
"PRICE_VAT" => array(
|
61 |
+
"name" => "PRICE_VAT",
|
62 |
+
"feed_name" => "PRICE_VAT",
|
63 |
+
"format" => "required",
|
64 |
+
"woo_suggest" => "price",
|
65 |
+
),
|
66 |
+
"MANUFACTURER" => array(
|
67 |
+
"name" => "MANUFACTURER",
|
68 |
+
"feed_name" => "MANUFACTURER",
|
69 |
+
"format" => "required",
|
70 |
+
),
|
71 |
+
"CATEGORYTEXT" => array(
|
72 |
+
"name" => "CATEGORYTEXT",
|
73 |
+
"feed_name" => "CATEGORYTEXT",
|
74 |
+
"format" => "required",
|
75 |
+
"woo_suggest" => "categories",
|
76 |
+
),
|
77 |
+
"CATEGORY_ID" => array(
|
78 |
+
"name" => "CATEGORY_ID",
|
79 |
+
"feed_name" => "CATEGORY_ID",
|
80 |
+
"format" => "optional",
|
81 |
+
),
|
82 |
+
"GLAMI_CPC" => array(
|
83 |
+
"name" => "GLAMI_CPC",
|
84 |
+
"feed_name" => "GLAMI_CPC",
|
85 |
+
"format" => "optional",
|
86 |
+
),
|
87 |
+
"PROMOTION_ID" => array(
|
88 |
+
"name" => "PROMOTION_ID",
|
89 |
+
"feed_name" => "PROMOTION_ID",
|
90 |
+
"format" => "optional",
|
91 |
+
),
|
92 |
+
"DELIVERY_DATE" => array(
|
93 |
+
"name" => "DELIVERY_DATE",
|
94 |
+
"feed_name" => "DELIVERY_DATE",
|
95 |
+
"format" => "required",
|
96 |
+
),
|
97 |
+
"DELIVERY" => array(
|
98 |
+
"name" => "DELIVERY",
|
99 |
+
"feed_name" => "DELIVERY",
|
100 |
+
"format" => "optional",
|
101 |
+
),
|
102 |
+
),
|
103 |
+
);
|
104 |
+
return $glami;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
?>
|
classes/channels/class-google_product_review.php
CHANGED
@@ -10,63 +10,52 @@ class WooSEA_google_product_review {
|
|
10 |
$sitename = get_option('blogname');
|
11 |
|
12 |
$google_product_review = array(
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"name" => "
|
16 |
-
"feed_name" => "
|
17 |
"format" => "required",
|
|
|
18 |
),
|
19 |
-
"
|
20 |
-
"name" => "
|
21 |
-
"feed_name" => "
|
22 |
"format" => "required",
|
23 |
-
"
|
24 |
),
|
25 |
-
"
|
26 |
-
"name" => "
|
27 |
-
"feed_name" => "
|
28 |
"format" => "required",
|
29 |
-
"woo_suggest" => "quantity",
|
30 |
),
|
31 |
-
"
|
32 |
-
"name" => "
|
33 |
-
"feed_name" => "
|
34 |
"format" => "required",
|
35 |
-
"woo_suggest" => "price",
|
36 |
),
|
37 |
-
"
|
38 |
-
"name" => "
|
39 |
-
"feed_name" => "
|
40 |
-
"format" => "
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
),
|
43 |
-
"Sale price effective date" => array(
|
44 |
-
"name" => "Sale price effective date",
|
45 |
-
"feed_name" => "sale price effective date",
|
46 |
-
"format" => "optional",
|
47 |
-
"woo_suggest" => "sale_price_effective_date",
|
48 |
-
),
|
49 |
-
"Availability" => array(
|
50 |
-
"name" => "Availability",
|
51 |
-
"feed_name" => "availability",
|
52 |
-
"format" => "optional",
|
53 |
-
"woo_suggest" => "availability",
|
54 |
-
),
|
55 |
-
"Weeks of supply" => array(
|
56 |
-
"name" => "Weeks of supply",
|
57 |
-
"feed_name" => "weeks of supply",
|
58 |
-
"format" => "optional",
|
59 |
-
),
|
60 |
-
"Pickup method" => array(
|
61 |
-
"name" => "Pickup method",
|
62 |
-
"feed_name" => "pickup method",
|
63 |
-
"format" => "optional",
|
64 |
-
),
|
65 |
-
"Pickup sla" => array(
|
66 |
-
"name" => "Pickup sla",
|
67 |
-
"feed_name" => "pickup sla",
|
68 |
-
"format" => "optional",
|
69 |
-
),
|
70 |
),
|
71 |
);
|
72 |
return $google_product_review;
|
10 |
$sitename = get_option('blogname');
|
11 |
|
12 |
$google_product_review = array(
|
13 |
+
"Product review fields" => array(
|
14 |
+
"product_name" => array(
|
15 |
+
"name" => "product_name",
|
16 |
+
"feed_name" => "product_name",
|
17 |
"format" => "required",
|
18 |
+
"woo_suggest" => "title",
|
19 |
),
|
20 |
+
"product_url" => array(
|
21 |
+
"name" => "product_url",
|
22 |
+
"feed_name" => "product_url",
|
23 |
"format" => "required",
|
24 |
+
"woo_suggest" => "link",
|
25 |
),
|
26 |
+
"brand" => array(
|
27 |
+
"name" => "brand",
|
28 |
+
"feed_name" => "brand",
|
29 |
"format" => "required",
|
|
|
30 |
),
|
31 |
+
"gtin" => array(
|
32 |
+
"name" => "gtin",
|
33 |
+
"feed_name" => "gtin",
|
34 |
"format" => "required",
|
|
|
35 |
),
|
36 |
+
"mpn" => array(
|
37 |
+
"name" => "mpn",
|
38 |
+
"feed_name" => "mpn",
|
39 |
+
"format" => "required",
|
40 |
+
),
|
41 |
+
"sku" => array(
|
42 |
+
"name" => "sku",
|
43 |
+
"feed_name" => "sku",
|
44 |
+
"format" => "required",
|
45 |
+
"woo_suggest" => "sku",
|
46 |
+
),
|
47 |
+
"reviews" => array(
|
48 |
+
"name" => "reviews",
|
49 |
+
"feed_name" => "reviews",
|
50 |
+
"format" => "required",
|
51 |
+
"woo_suggest" => "reviews",
|
52 |
+
),
|
53 |
+
"review_url" => array(
|
54 |
+
"name" => "review_url",
|
55 |
+
"feed_name" => "review_url",
|
56 |
+
"format" => "required",
|
57 |
+
"woo_suggest" => "link",
|
58 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
),
|
60 |
);
|
61 |
return $google_product_review;
|
classes/channels/class-google_shopping.php
CHANGED
@@ -106,6 +106,11 @@ class WooSEA_google_shopping {
|
|
106 |
"feed_name" => "g:installment",
|
107 |
"format" => "optional",
|
108 |
),
|
|
|
|
|
|
|
|
|
|
|
109 |
"Loyalty points" => array(
|
110 |
"name" => "loyalty_points",
|
111 |
"feed_name" => "g:loyalty_points",
|
@@ -229,7 +234,8 @@ class WooSEA_google_shopping {
|
|
229 |
"Item group ID" => array(
|
230 |
"name" => "item_group_id",
|
231 |
"feed_name" => "g:item_group_id",
|
232 |
-
"format" => "
|
|
|
233 |
),
|
234 |
),
|
235 |
"Shopping campaigns" => array(
|
@@ -288,6 +294,16 @@ class WooSEA_google_shopping {
|
|
288 |
"feed_name" => "g:excluded_destination",
|
289 |
"format" => "optional",
|
290 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
),
|
292 |
"Shipping" => array(
|
293 |
"Shipping" => array(
|
@@ -320,6 +336,11 @@ class WooSEA_google_shopping {
|
|
320 |
"feed_name" => "g:shipping_height",
|
321 |
"format" => "optional",
|
322 |
),
|
|
|
|
|
|
|
|
|
|
|
323 |
"Minimum handling time" => array(
|
324 |
"name" => "min_handling_time",
|
325 |
"feed_name" => "g:min_handling_time",
|
106 |
"feed_name" => "g:installment",
|
107 |
"format" => "optional",
|
108 |
),
|
109 |
+
"Subscription cost" => array(
|
110 |
+
"name" => "subscription_cost",
|
111 |
+
"feed_name" => "g:subscription_cost",
|
112 |
+
"format" => "optional",
|
113 |
+
),
|
114 |
"Loyalty points" => array(
|
115 |
"name" => "loyalty_points",
|
116 |
"feed_name" => "g:loyalty_points",
|
234 |
"Item group ID" => array(
|
235 |
"name" => "item_group_id",
|
236 |
"feed_name" => "g:item_group_id",
|
237 |
+
"format" => "required",
|
238 |
+
"woo_suggest" => "item_group_id",
|
239 |
),
|
240 |
),
|
241 |
"Shopping campaigns" => array(
|
294 |
"feed_name" => "g:excluded_destination",
|
295 |
"format" => "optional",
|
296 |
),
|
297 |
+
"Ads grouping" => array(
|
298 |
+
"name" => "ads_grouping",
|
299 |
+
"feed_name" => "g:ads_grouping",
|
300 |
+
"format" => "optional",
|
301 |
+
),
|
302 |
+
"Ads labels" => array(
|
303 |
+
"name" => "ads_labels",
|
304 |
+
"feed_name" => "g:ads_labels",
|
305 |
+
"format" => "optional",
|
306 |
+
),
|
307 |
),
|
308 |
"Shipping" => array(
|
309 |
"Shipping" => array(
|
336 |
"feed_name" => "g:shipping_height",
|
337 |
"format" => "optional",
|
338 |
),
|
339 |
+
"Transit time label" => array(
|
340 |
+
"name" => "transit_time_label",
|
341 |
+
"feed_name" => "g:transit_time_label",
|
342 |
+
"format" => "optional",
|
343 |
+
),
|
344 |
"Minimum handling time" => array(
|
345 |
"name" => "min_handling_time",
|
346 |
"feed_name" => "g:min_handling_time",
|
classes/channels/class-heureka.php
CHANGED
@@ -157,6 +157,31 @@ class WooSEA_heureka {
|
|
157 |
"feed_name" => "MAX_CPC_SEARCH",
|
158 |
"format" => "optional",
|
159 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
),
|
161 |
);
|
162 |
return $heureka;
|
157 |
"feed_name" => "MAX_CPC_SEARCH",
|
158 |
"format" => "optional",
|
159 |
),
|
160 |
+
"LENGTH" => array(
|
161 |
+
"name" => "LENGTH",
|
162 |
+
"feed_name" => "LENGTH",
|
163 |
+
"format" => "optional",
|
164 |
+
),
|
165 |
+
"VOLUME" => array(
|
166 |
+
"name" => "VOLUME",
|
167 |
+
"feed_name" => "VOLUME",
|
168 |
+
"format" => "optional",
|
169 |
+
),
|
170 |
+
"SIZE" => array(
|
171 |
+
"name" => "SIZE",
|
172 |
+
"feed_name" => "SIZE",
|
173 |
+
"format" => "optional",
|
174 |
+
),
|
175 |
+
"COLOR" => array(
|
176 |
+
"name" => "COLOR",
|
177 |
+
"feed_name" => "COLOR",
|
178 |
+
"format" => "optional",
|
179 |
+
),
|
180 |
+
"PURPOSE" => array(
|
181 |
+
"name" => "PURPOSE",
|
182 |
+
"feed_name" => "PURPOSE",
|
183 |
+
"format" => "optional",
|
184 |
+
),
|
185 |
),
|
186 |
);
|
187 |
return $heureka;
|
classes/channels/class-pinterest.php
ADDED
@@ -0,0 +1,350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings for Pinterest product feeds
|
4 |
+
*/
|
5 |
+
class WooSEA_pinterest {
|
6 |
+
public $pinterest;
|
7 |
+
|
8 |
+
public static function get_channel_attributes() {
|
9 |
+
$sitename = get_option('blogname');
|
10 |
+
|
11 |
+
$pinterest = array(
|
12 |
+
"Basic product data" => array(
|
13 |
+
"Product ID" => array(
|
14 |
+
"name" => "id",
|
15 |
+
"feed_name" => "g:id",
|
16 |
+
"format" => "required",
|
17 |
+
"woo_suggest" => "id",
|
18 |
+
),
|
19 |
+
"Product title" => array(
|
20 |
+
"name" => "title",
|
21 |
+
"feed_name" => "g:title",
|
22 |
+
"format" => "required",
|
23 |
+
"woo_suggest" => "title",
|
24 |
+
),
|
25 |
+
"Product description" => array(
|
26 |
+
"name" => "description",
|
27 |
+
"feed_name" => "g:description",
|
28 |
+
"format" => "required",
|
29 |
+
"woo_suggest" => "description",
|
30 |
+
),
|
31 |
+
"Product URL" => array(
|
32 |
+
"name" => "link",
|
33 |
+
"feed_name" => "g:link",
|
34 |
+
"format" => "required",
|
35 |
+
"woo_suggest" => "link",
|
36 |
+
),
|
37 |
+
"Main image URL" => array(
|
38 |
+
"name" => "image_link",
|
39 |
+
"feed_name" => "g:image_link",
|
40 |
+
"format" => "required",
|
41 |
+
"woo_suggest" => "image",
|
42 |
+
),
|
43 |
+
"Additional image URL" => array(
|
44 |
+
"name" => "additional_image_link",
|
45 |
+
"feed_name" => "g:additional_image_link",
|
46 |
+
"format" => "optional",
|
47 |
+
),
|
48 |
+
"Product URL mobile" => array(
|
49 |
+
"name" => "mobile_link",
|
50 |
+
"feed_name" => "g:mobile_link",
|
51 |
+
"format" => "optional",
|
52 |
+
),
|
53 |
+
),
|
54 |
+
"Price & availability" => array(
|
55 |
+
"Stock status" => array(
|
56 |
+
"name" => "availability",
|
57 |
+
"feed_name" => "g:availability",
|
58 |
+
"format" => "required",
|
59 |
+
"woo_suggest" => "availability",
|
60 |
+
),
|
61 |
+
"Availability date" => array(
|
62 |
+
"name" => "availability_date",
|
63 |
+
"feed_name" => "g:availability_date",
|
64 |
+
"format" => "optional",
|
65 |
+
),
|
66 |
+
"Expiration date" => array(
|
67 |
+
"name" => "expiration_date",
|
68 |
+
"feed_name" => "g:expiration_date",
|
69 |
+
"format" => "optional",
|
70 |
+
),
|
71 |
+
"Price" => array(
|
72 |
+
"name" => "Price",
|
73 |
+
"feed_name" => "g:price",
|
74 |
+
"format" => "required",
|
75 |
+
"woo_suggest" => "price",
|
76 |
+
),
|
77 |
+
"Sale price" => array(
|
78 |
+
"name" => "sale_price",
|
79 |
+
"feed_name" => "g:sale_price",
|
80 |
+
"format" => "optional",
|
81 |
+
"woo_suggest" => "sale_price",
|
82 |
+
),
|
83 |
+
"Sale price effective date" => array(
|
84 |
+
"name" => "sale_price_effective_date",
|
85 |
+
"feed_name" => "g:sale_price_effective_date",
|
86 |
+
"format" => "optional",
|
87 |
+
"woo_suggest" => "sale_price_effective_date",
|
88 |
+
),
|
89 |
+
"Unit pricing measure" => array(
|
90 |
+
"name" => "unit_pricing_measure",
|
91 |
+
"feed_name" => "g:unit_pricing_measure",
|
92 |
+
"format" => "optional",
|
93 |
+
),
|
94 |
+
"Unit pricing base measure" => array(
|
95 |
+
"name" => "unit_pricing_base_measure",
|
96 |
+
"feed_name" => "g:unit_pricing_base_measure",
|
97 |
+
"format" => "optional",
|
98 |
+
),
|
99 |
+
"Cost of goods sold" => array(
|
100 |
+
"name" => "cost_of_goods_sold",
|
101 |
+
"feed_name" => "g:cost_of_goods_sold",
|
102 |
+
"format" => "optional",
|
103 |
+
),
|
104 |
+
"Installment" => array(
|
105 |
+
"name" => "installment",
|
106 |
+
"feed_name" => "g:installment",
|
107 |
+
"format" => "optional",
|
108 |
+
),
|
109 |
+
"Loyalty points" => array(
|
110 |
+
"name" => "loyalty_points",
|
111 |
+
"feed_name" => "g:loyalty_points",
|
112 |
+
"format" => "optional",
|
113 |
+
),
|
114 |
+
),
|
115 |
+
"Product category" => array(
|
116 |
+
"Google product category" => array(
|
117 |
+
"name" => "google_product_category",
|
118 |
+
"feed_name" => "g:google_product_category",
|
119 |
+
"format" => "required",
|
120 |
+
"woo_suggest" => "categories",
|
121 |
+
),
|
122 |
+
"Product type" => array(
|
123 |
+
"name" => "product_type",
|
124 |
+
"feed_name" => "g:product_type",
|
125 |
+
"format" => "optional",
|
126 |
+
"woo_suggest" => "product_type",
|
127 |
+
),
|
128 |
+
),
|
129 |
+
"Product identifiers" => array(
|
130 |
+
"Brand" => array(
|
131 |
+
"name" => "brand",
|
132 |
+
"feed_name" => "g:brand",
|
133 |
+
"format" => "required",
|
134 |
+
),
|
135 |
+
"Gtin" => array(
|
136 |
+
"name" => "gtin",
|
137 |
+
"feed_name" => "g:gtin",
|
138 |
+
"format" => "required",
|
139 |
+
),
|
140 |
+
"MPN" => array(
|
141 |
+
"name" => "mpn",
|
142 |
+
"feed_name" => "g:mpn",
|
143 |
+
"format" => "required",
|
144 |
+
),
|
145 |
+
"Identifier exists" => array(
|
146 |
+
"name" => "identifier_exists",
|
147 |
+
"feed_name" => "g:identifier_exists",
|
148 |
+
"woo_suggest" => "calculated",
|
149 |
+
"format" => "required",
|
150 |
+
),
|
151 |
+
),
|
152 |
+
"Detailed product description" => array(
|
153 |
+
"Condition" => array(
|
154 |
+
"name" => "condition",
|
155 |
+
"feed_name" => "g:condition",
|
156 |
+
"format" => "required",
|
157 |
+
"woo_suggest" => "condition",
|
158 |
+
),
|
159 |
+
"Adult" => array(
|
160 |
+
"name" => "adult",
|
161 |
+
"feed_name" => "g:adult",
|
162 |
+
"format" => "optional",
|
163 |
+
),
|
164 |
+
"Multipack" => array(
|
165 |
+
"name" => "multipack",
|
166 |
+
"feed_name" => "g:multipack",
|
167 |
+
"format" => "optional",
|
168 |
+
),
|
169 |
+
"Is bundle" => array(
|
170 |
+
"name" => "is_bundle",
|
171 |
+
"feed_name" => "g:is_bundle",
|
172 |
+
"format" => "optional",
|
173 |
+
),
|
174 |
+
"Energy efficiency class" => array(
|
175 |
+
"name" => "energy_efficiency_class",
|
176 |
+
"feed_name" => "g:energy_efficiency_class",
|
177 |
+
"format" => "optional",
|
178 |
+
),
|
179 |
+
"Minimum energy efficiency class" => array(
|
180 |
+
"name" => "min_energy_efficiency_class",
|
181 |
+
"feed_name" => "g:min_energy_efficiency_class",
|
182 |
+
"format" => "optional",
|
183 |
+
),
|
184 |
+
"Maximum energy efficiency class" => array(
|
185 |
+
"name" => "max_energy_efficiency_class",
|
186 |
+
"feed_name" => "g:max_energy_efficiency_class",
|
187 |
+
"format" => "optional",
|
188 |
+
),
|
189 |
+
"Age group" => array(
|
190 |
+
"name" => "age_group",
|
191 |
+
"feed_name" => "g:age_group",
|
192 |
+
"format" => "optional",
|
193 |
+
),
|
194 |
+
"Color" => array(
|
195 |
+
"name" => "color",
|
196 |
+
"feed_name" => "g:color",
|
197 |
+
"format" => "optional",
|
198 |
+
),
|
199 |
+
"Gender" => array(
|
200 |
+
"name" => "gender",
|
201 |
+
"feed_name" => "g:gender",
|
202 |
+
"format" => "optional",
|
203 |
+
),
|
204 |
+
"Material" => array(
|
205 |
+
"name" => "material",
|
206 |
+
"feed_name" => "g:material",
|
207 |
+
"format" => "optional",
|
208 |
+
),
|
209 |
+
"Pattern" => array(
|
210 |
+
"name" => "pattern",
|
211 |
+
"feed_name" => "g:pattern",
|
212 |
+
"format" => "optional",
|
213 |
+
),
|
214 |
+
"Size" => array(
|
215 |
+
"name" => "size",
|
216 |
+
"feed_name" => "g:size",
|
217 |
+
"format" => "optional",
|
218 |
+
),
|
219 |
+
"Size type" => array(
|
220 |
+
"name" => "size_type",
|
221 |
+
"feed_name" => "g:size_type",
|
222 |
+
"format" => "optional",
|
223 |
+
),
|
224 |
+
"Size system" => array(
|
225 |
+
"name" => "size_system",
|
226 |
+
"feed_name" => "g:size_system",
|
227 |
+
"format" => "optional",
|
228 |
+
),
|
229 |
+
"Item group ID" => array(
|
230 |
+
"name" => "item_group_id",
|
231 |
+
"feed_name" => "g:item_group_id",
|
232 |
+
"format" => "required",
|
233 |
+
),
|
234 |
+
),
|
235 |
+
"Shopping campaigns" => array(
|
236 |
+
"Adwords redirect (old)" => array(
|
237 |
+
"name" => "adwords_redirect",
|
238 |
+
"feed_name" => "g:adwords_redirect",
|
239 |
+
"format" => "optional",
|
240 |
+
),
|
241 |
+
"Ads redirect (new)" => array(
|
242 |
+
"name" => "ads_redirect",
|
243 |
+
"feed_name" => "g:ads_redirect",
|
244 |
+
"format" => "optional",
|
245 |
+
),
|
246 |
+
"Excluded destination" => array(
|
247 |
+
"name" => "excluded_destination",
|
248 |
+
"feed_name" => "g:excluded_destination",
|
249 |
+
"format" => "optional",
|
250 |
+
),
|
251 |
+
"Custom label 0" => array(
|
252 |
+
"name" => "custom_label_0",
|
253 |
+
"feed_name" => "g:custom_label_0",
|
254 |
+
"format" => "optional",
|
255 |
+
),
|
256 |
+
"Custom label 1" => array(
|
257 |
+
"name" => "custom_label_1",
|
258 |
+
"feed_name" => "g:custom_label_1",
|
259 |
+
"format" => "optional",
|
260 |
+
),
|
261 |
+
"Custom label 2" => array(
|
262 |
+
"name" => "custom_label_2",
|
263 |
+
"feed_name" => "g:custom_label_2",
|
264 |
+
"format" => "optional",
|
265 |
+
),
|
266 |
+
"Custom label 3" => array(
|
267 |
+
"name" => "custom_label_3",
|
268 |
+
"feed_name" => "g:custom_label_3",
|
269 |
+
"format" => "optional",
|
270 |
+
),
|
271 |
+
"Custom label 4" => array(
|
272 |
+
"name" => "custom_label_4",
|
273 |
+
"feed_name" => "g:custom_label_4",
|
274 |
+
"format" => "optional",
|
275 |
+
),
|
276 |
+
"Promotion ID" => array(
|
277 |
+
"name" => "promotion_id",
|
278 |
+
"feed_name" => "g:promotion_id",
|
279 |
+
"format" => "optional",
|
280 |
+
),
|
281 |
+
"Included destination" => array(
|
282 |
+
"name" => "included_destination",
|
283 |
+
"feed_name" => "included_destination",
|
284 |
+
"format" => "optional",
|
285 |
+
),
|
286 |
+
"Excluded destination" => array(
|
287 |
+
"name" => "excluded_destination",
|
288 |
+
"feed_name" => "g:excluded_destination",
|
289 |
+
"format" => "optional",
|
290 |
+
),
|
291 |
+
),
|
292 |
+
"Shipping" => array(
|
293 |
+
"Shipping" => array(
|
294 |
+
"name" => "shipping",
|
295 |
+
"feed_name" => "g:shipping",
|
296 |
+
"format" => "optional",
|
297 |
+
),
|
298 |
+
"Shipping label" => array(
|
299 |
+
"name" => "shipping_label",
|
300 |
+
"feed_name" => "g:shipping_label",
|
301 |
+
"format" => "optional",
|
302 |
+
),
|
303 |
+
"Shipping weight" => array(
|
304 |
+
"name" => "shipping_weight",
|
305 |
+
"feed_name" => "g:shipping_weight",
|
306 |
+
"format" => "optional",
|
307 |
+
),
|
308 |
+
"Shipping length" => array(
|
309 |
+
"name" => "shipping_length",
|
310 |
+
"feed_name" => "g:shipping_length",
|
311 |
+
"format" => "optional",
|
312 |
+
),
|
313 |
+
"Shipping width" => array(
|
314 |
+
"name" => "shipping_width",
|
315 |
+
"feed_name" => "g:shipping_width",
|
316 |
+
"format" => "optional",
|
317 |
+
),
|
318 |
+
"Shipping height" => array(
|
319 |
+
"name" => "shipping_height",
|
320 |
+
"feed_name" => "g:shipping_height",
|
321 |
+
"format" => "optional",
|
322 |
+
),
|
323 |
+
"Minimum handling time" => array(
|
324 |
+
"name" => "min_handling_time",
|
325 |
+
"feed_name" => "g:min_handling_time",
|
326 |
+
"format" => "optional",
|
327 |
+
),
|
328 |
+
"Maximum handling time" => array(
|
329 |
+
"name" => "max_handling_time",
|
330 |
+
"feed_name" => "g:max_handling_time",
|
331 |
+
"format" => "optional",
|
332 |
+
),
|
333 |
+
),
|
334 |
+
"Tax" => array(
|
335 |
+
"Tax" => array(
|
336 |
+
"name" => "tax",
|
337 |
+
"feed_name" => "g:tax",
|
338 |
+
"format" => "optional",
|
339 |
+
),
|
340 |
+
"Tax category" => array(
|
341 |
+
"name" => "tax_category",
|
342 |
+
"feed_name" => "g:tax_category",
|
343 |
+
"format" => "optional",
|
344 |
+
),
|
345 |
+
),
|
346 |
+
);
|
347 |
+
return $pinterest;
|
348 |
+
}
|
349 |
+
}
|
350 |
+
?>
|
classes/channels/class-pricecheck.php
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings for Pricecheck South Africa feeds
|
4 |
+
*/
|
5 |
+
class WooSEA_pricecheck {
|
6 |
+
public $pricecheck;
|
7 |
+
|
8 |
+
public static function get_channel_attributes() {
|
9 |
+
|
10 |
+
$sitename = get_option('blogname');
|
11 |
+
|
12 |
+
$pricecheck = array(
|
13 |
+
"Feed fields" => array(
|
14 |
+
"Category" => array(
|
15 |
+
"name" => "Category",
|
16 |
+
"feed_name" => "Category",
|
17 |
+
"format" => "required",
|
18 |
+
"woo_suggest" => "categories",
|
19 |
+
),
|
20 |
+
"ProductName" => array(
|
21 |
+
"name" => "ProductName",
|
22 |
+
"feed_name" => "ProductName",
|
23 |
+
"format" => "required",
|
24 |
+
"woo_suggest" => "title",
|
25 |
+
),
|
26 |
+
"Manufacturer" => array(
|
27 |
+
"name" => "Manufacturer",
|
28 |
+
"feed_name" => "Manufacturer",
|
29 |
+
"format" => "required",
|
30 |
+
),
|
31 |
+
"ShopSKU" => array(
|
32 |
+
"name" => "ShopSKU",
|
33 |
+
"feed_name" => "ShopSKU",
|
34 |
+
"format" => "required",
|
35 |
+
"woo_suggest" => "SKU",
|
36 |
+
),
|
37 |
+
"ModelNumber" => array(
|
38 |
+
"name" => "ModelNumber",
|
39 |
+
"feed_name" => "ModelNumber",
|
40 |
+
"format" => "optional",
|
41 |
+
),
|
42 |
+
"EAN" => array(
|
43 |
+
"name" => "EAN",
|
44 |
+
"feed_name" => "EAN",
|
45 |
+
"format" => "optional",
|
46 |
+
),
|
47 |
+
"UPC" => array(
|
48 |
+
"name" => "UPC",
|
49 |
+
"feed_name" => "UPC",
|
50 |
+
"format" => "optional",
|
51 |
+
),
|
52 |
+
"Description" => array(
|
53 |
+
"name" => "Description",
|
54 |
+
"feed_name" => "Description",
|
55 |
+
"format" => "required",
|
56 |
+
"woo_suggest" => "description",
|
57 |
+
),
|
58 |
+
"Price" => array(
|
59 |
+
"name" => "Price",
|
60 |
+
"feed_name" => "Price",
|
61 |
+
"format" => "required",
|
62 |
+
"woo_suggest" => "price",
|
63 |
+
),
|
64 |
+
"SalePrice" => array(
|
65 |
+
"name" => "SalePrice",
|
66 |
+
"feed_name" => "SalePrice",
|
67 |
+
"format" => "optional",
|
68 |
+
),
|
69 |
+
"DeliveryCost" => array(
|
70 |
+
"name" => "DeliveryCost",
|
71 |
+
"feed_name" => "DeliveryCost",
|
72 |
+
"format" => "optional",
|
73 |
+
),
|
74 |
+
"ProductURL" => array(
|
75 |
+
"name" => "ProductURL",
|
76 |
+
"feed_name" => "ProductURL",
|
77 |
+
"format" => "required",
|
78 |
+
"woo_suggest" => "link",
|
79 |
+
),
|
80 |
+
"ImageURL" => array(
|
81 |
+
"name" => "ImageURL",
|
82 |
+
"feed_name" => "ImageURL",
|
83 |
+
"format" => "required",
|
84 |
+
"woo_suggest" => "image",
|
85 |
+
),
|
86 |
+
"Notes" => array(
|
87 |
+
"name" => "Notes",
|
88 |
+
"feed_name" => "Notes",
|
89 |
+
"format" => "optional",
|
90 |
+
),
|
91 |
+
"StockAvailability" => array(
|
92 |
+
"name" => "StockAvailability",
|
93 |
+
"feed_name" => "StockAvailability",
|
94 |
+
"format" => "optional",
|
95 |
+
),
|
96 |
+
"StockLevel" => array(
|
97 |
+
"name" => "StockLevel",
|
98 |
+
"feed_name" => "StockLevel",
|
99 |
+
"format" => "optional",
|
100 |
+
),
|
101 |
+
"Is MP" => array(
|
102 |
+
"name" => "is_mp",
|
103 |
+
"feed_name" => "is_mp",
|
104 |
+
"format" => "optional",
|
105 |
+
),
|
106 |
+
"IsBundle" => array(
|
107 |
+
"name" => "IsBundle",
|
108 |
+
"feed_name" => "IsBundle",
|
109 |
+
"format" => "optional",
|
110 |
+
),
|
111 |
+
"GroupID" => array(
|
112 |
+
"name" => "GroupID",
|
113 |
+
"feed_name" => "GroupID",
|
114 |
+
"format" => "optional",
|
115 |
+
),
|
116 |
+
"NoOfUnits" => array(
|
117 |
+
"name" => "NoOfUnits",
|
118 |
+
"feed_name" => "NoOfUnits",
|
119 |
+
"format" => "optional",
|
120 |
+
),
|
121 |
+
"Format" => array(
|
122 |
+
"name" => "Format",
|
123 |
+
"feed_name" => "Format",
|
124 |
+
"format" => "optional",
|
125 |
+
),
|
126 |
+
"Actor" => array(
|
127 |
+
"name" => "Actor",
|
128 |
+
"feed_name" => "Actor",
|
129 |
+
"format" => "optional",
|
130 |
+
),
|
131 |
+
"Director" => array(
|
132 |
+
"name" => "Director",
|
133 |
+
"feed_name" => "Director",
|
134 |
+
"format" => "optional",
|
135 |
+
),
|
136 |
+
"ReleaseDate" => array(
|
137 |
+
"name" => "ReleaseDate",
|
138 |
+
"feed_name" => "ReleaseDate",
|
139 |
+
"format" => "optional",
|
140 |
+
),
|
141 |
+
"RunningTime" => array(
|
142 |
+
"name" => "RunningTime",
|
143 |
+
"feed_name" => "RunningTime",
|
144 |
+
"format" => "optional",
|
145 |
+
),
|
146 |
+
"AgeGroup" => array(
|
147 |
+
"name" => "AgeGroup",
|
148 |
+
"feed_name" => "AgeGroup",
|
149 |
+
"format" => "optional",
|
150 |
+
),
|
151 |
+
"Colour" => array(
|
152 |
+
"name" => "Colour",
|
153 |
+
"feed_name" => "Colour",
|
154 |
+
"format" => "optional",
|
155 |
+
),
|
156 |
+
"Gender" => array(
|
157 |
+
"name" => "Gender",
|
158 |
+
"feed_name" => "Gender",
|
159 |
+
"format" => "optional",
|
160 |
+
),
|
161 |
+
"Size" => array(
|
162 |
+
"name" => "Size",
|
163 |
+
"feed_name" => "Size",
|
164 |
+
"format" => "optional",
|
165 |
+
),
|
166 |
+
"Material" => array(
|
167 |
+
"name" => "Material",
|
168 |
+
"feed_name" => "Material",
|
169 |
+
"format" => "optional",
|
170 |
+
),
|
171 |
+
"Pattern" => array(
|
172 |
+
"name" => "Pattern",
|
173 |
+
"feed_name" => "Pattern",
|
174 |
+
"format" => "optional",
|
175 |
+
),
|
176 |
+
"SizeType" => array(
|
177 |
+
"name" => "SizeType",
|
178 |
+
"feed_name" => "SizeType",
|
179 |
+
"format" => "optional",
|
180 |
+
),
|
181 |
+
"Style" => array(
|
182 |
+
"name" => "Style",
|
183 |
+
"feed_name" => "Style",
|
184 |
+
"format" => "optional",
|
185 |
+
),
|
186 |
+
"Region" => array(
|
187 |
+
"name" => "Region",
|
188 |
+
"feed_name" => "Region",
|
189 |
+
"format" => "optional",
|
190 |
+
),
|
191 |
+
"Varietal" => array(
|
192 |
+
"name" => "Varietal",
|
193 |
+
"feed_name" => "Varietal",
|
194 |
+
"format" => "optional",
|
195 |
+
),
|
196 |
+
"Vintage" => array(
|
197 |
+
"name" => "Vintage",
|
198 |
+
"feed_name" => "Vintage",
|
199 |
+
"format" => "optional",
|
200 |
+
),
|
201 |
+
"Volume" => array(
|
202 |
+
"name" => "Volume",
|
203 |
+
"feed_name" => "Volume",
|
204 |
+
"format" => "optional",
|
205 |
+
),
|
206 |
+
"Winery" => array(
|
207 |
+
"name" => "Winery",
|
208 |
+
"feed_name" => "Winery",
|
209 |
+
"format" => "optional",
|
210 |
+
),
|
211 |
+
"Artist" => array(
|
212 |
+
"name" => "Artist",
|
213 |
+
"feed_name" => "Artist",
|
214 |
+
"format" => "optional",
|
215 |
+
),
|
216 |
+
"Label" => array(
|
217 |
+
"name" => "Label",
|
218 |
+
"feed_name" => "Label",
|
219 |
+
"format" => "optional",
|
220 |
+
),
|
221 |
+
"ReleaseDate" => array(
|
222 |
+
"name" => "ReleaseDate",
|
223 |
+
"feed_name" => "ReleaseDate",
|
224 |
+
"format" => "optional",
|
225 |
+
),
|
226 |
+
"Make" => array(
|
227 |
+
"name" => "Make",
|
228 |
+
"feed_name" => "Make",
|
229 |
+
"format" => "optional",
|
230 |
+
),
|
231 |
+
"Model" => array(
|
232 |
+
"name" => "Model",
|
233 |
+
"feed_name" => "Model",
|
234 |
+
"format" => "optional",
|
235 |
+
),
|
236 |
+
"Year" => array(
|
237 |
+
"name" => "Year",
|
238 |
+
"feed_name" => "Year",
|
239 |
+
"format" => "optional",
|
240 |
+
),
|
241 |
+
"Mileage" => array(
|
242 |
+
"name" => "Mileage",
|
243 |
+
"feed_name" => "Mileage",
|
244 |
+
"format" => "optional",
|
245 |
+
),
|
246 |
+
"Transmission" => array(
|
247 |
+
"name" => "Transmission",
|
248 |
+
"feed_name" => "Transmission",
|
249 |
+
"format" => "optional",
|
250 |
+
),
|
251 |
+
"Colour" => array(
|
252 |
+
"name" => "Colour",
|
253 |
+
"feed_name" => "Colour",
|
254 |
+
"format" => "optional",
|
255 |
+
),
|
256 |
+
),
|
257 |
+
);
|
258 |
+
return $pricecheck;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
?>
|
classes/channels/class-ricardo.php
ADDED
@@ -0,0 +1,275 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings for Ricardo feeds
|
4 |
+
*/
|
5 |
+
class WooSEA_ricardo {
|
6 |
+
public $ricardo;
|
7 |
+
|
8 |
+
public static function get_channel_attributes() {
|
9 |
+
|
10 |
+
$sitename = get_option('blogname');
|
11 |
+
|
12 |
+
$ricardo = array(
|
13 |
+
"Feed fields" => array(
|
14 |
+
"StartPrice" => array(
|
15 |
+
"name" => "StartPrice",
|
16 |
+
"feed_name" => "StartPrice",
|
17 |
+
"format" => "required",
|
18 |
+
),
|
19 |
+
"BuyNowPrice" => array(
|
20 |
+
"name" => "BuyNowPrice",
|
21 |
+
"feed_name" => "BuyNowPrice",
|
22 |
+
"format" => "required",
|
23 |
+
"woo_suggest" => "price"
|
24 |
+
),
|
25 |
+
"AvailibilityId" => array(
|
26 |
+
"name" => "AvailabilityId",
|
27 |
+
"feed_name" => "AvailabilityId",
|
28 |
+
"format" => "required",
|
29 |
+
),
|
30 |
+
"Duration" => array(
|
31 |
+
"name" => "Duration",
|
32 |
+
"feed_name" => "Duration",
|
33 |
+
"format" => "required",
|
34 |
+
),
|
35 |
+
"FeaturedHomePage" => array(
|
36 |
+
"name" => "FeaturedHomepage",
|
37 |
+
"feed_name" => "FeaturedHomepage",
|
38 |
+
"format" => "required",
|
39 |
+
),
|
40 |
+
"Shipping" => array(
|
41 |
+
"name" => "Shipping",
|
42 |
+
"feed_name" => "Shipping",
|
43 |
+
"format" => "required",
|
44 |
+
),
|
45 |
+
"Warranty" => array(
|
46 |
+
"name" => "Warranty",
|
47 |
+
"feed_name" => "Warranty",
|
48 |
+
"format" => "required",
|
49 |
+
),
|
50 |
+
"Quantity" => array(
|
51 |
+
"name" => "Quantity",
|
52 |
+
"feed_name" => "Quantity",
|
53 |
+
"format" => "required",
|
54 |
+
),
|
55 |
+
"Increment" => array(
|
56 |
+
"name" => "Increment",
|
57 |
+
"feed_name" => "Increment",
|
58 |
+
"format" => "required",
|
59 |
+
),
|
60 |
+
"CategoryNr" => array(
|
61 |
+
"name" => "CategoryNr",
|
62 |
+
"feed_name" => "CategoryNr",
|
63 |
+
"format" => "required",
|
64 |
+
),
|
65 |
+
"Condition" => array(
|
66 |
+
"name" => "Condition",
|
67 |
+
"feed_name" => "Condition",
|
68 |
+
"format" => "required",
|
69 |
+
),
|
70 |
+
"ShippingCost" => array(
|
71 |
+
"name" => "ShippingCost",
|
72 |
+
"feed_name" => "ShippingCost",
|
73 |
+
"format" => "required",
|
74 |
+
),
|
75 |
+
"ResellCount" => array(
|
76 |
+
"name" => "ResellCount",
|
77 |
+
"feed_name" => "ResellCount",
|
78 |
+
"format" => "required",
|
79 |
+
),
|
80 |
+
"BuyNow" => array(
|
81 |
+
"name" => "BuyNow",
|
82 |
+
"feed_name" => "BuyNow",
|
83 |
+
"format" => "required",
|
84 |
+
),
|
85 |
+
"BuyNowCost" => array(
|
86 |
+
"name" => "BuyNowCost",
|
87 |
+
"feed_name" => "BuyNowCost",
|
88 |
+
"format" => "required",
|
89 |
+
),
|
90 |
+
"TemplateName" => array(
|
91 |
+
"name" => "TemplateName",
|
92 |
+
"feed_name" => "TemplateName",
|
93 |
+
"format" => "required",
|
94 |
+
),
|
95 |
+
"StartDate" => array(
|
96 |
+
"name" => "StartDate",
|
97 |
+
"feed_name" => "StartDate",
|
98 |
+
"format" => "required",
|
99 |
+
),
|
100 |
+
"StartImmediatly" => array(
|
101 |
+
"name" => "StartImmediatly",
|
102 |
+
"feed_name" => "StartImmediatly",
|
103 |
+
"format" => "required",
|
104 |
+
),
|
105 |
+
"EndDate" => array(
|
106 |
+
"name" => "EndDate",
|
107 |
+
"feed_name" => "EndDate",
|
108 |
+
"format" => "required",
|
109 |
+
),
|
110 |
+
"HasFixedEndDate" => array(
|
111 |
+
"name" => "HasFixedEndDate",
|
112 |
+
"feed_name" => "HasFixedEndDate",
|
113 |
+
"format" => "required",
|
114 |
+
),
|
115 |
+
"InternalReference" => array(
|
116 |
+
"name" => "InternalReference",
|
117 |
+
"feed_name" => "InternalReference",
|
118 |
+
"format" => "required",
|
119 |
+
),
|
120 |
+
"TemplateId" => array(
|
121 |
+
"name" => "TemplateId",
|
122 |
+
"feed_name" => "TemplateId",
|
123 |
+
"format" => "required",
|
124 |
+
),
|
125 |
+
"PackageSizeId" => array(
|
126 |
+
"name" => "PackageSizeId",
|
127 |
+
"feed_name" => "PackageSizeId",
|
128 |
+
"format" => "required",
|
129 |
+
),
|
130 |
+
"PromotionId" => array(
|
131 |
+
"name" => "PromotionId",
|
132 |
+
"feed_name" => "PromotionId",
|
133 |
+
"format" => "required",
|
134 |
+
),
|
135 |
+
"IsCarsBikesAccessoriesArticle" => array(
|
136 |
+
"name" => "IsCarsBikesAccessoriesArticle",
|
137 |
+
"feed_name" => "IsCarsBikesAccessoriesArticle",
|
138 |
+
"format" => "required",
|
139 |
+
),
|
140 |
+
"Descriptions[0].LanguageNr" => array(
|
141 |
+
"name" => "Descriptions[0].LanguageNr",
|
142 |
+
"feed_name" => "Descriptions[0].LanguageNr",
|
143 |
+
"format" => "required",
|
144 |
+
),
|
145 |
+
"Descriptions[0].ProductTitle" => array(
|
146 |
+
"name" => "Descriptions[0].ProductTitle",
|
147 |
+
"feed_name" => "Descriptions[0].ProductTitle",
|
148 |
+
"format" => "required",
|
149 |
+
),
|
150 |
+
"Descriptions[0].ProductDescription" => array(
|
151 |
+
"name" => "Descriptions[0].ProductDescription",
|
152 |
+
"feed_name" => "Descriptions[0].ProductDescription",
|
153 |
+
"format" => "required",
|
154 |
+
),
|
155 |
+
"Descriptions[0].ProductSubtitle" => array(
|
156 |
+
"name" => "Descriptions[0].ProductSubtitle",
|
157 |
+
"feed_name" => "Descriptions[0].ProductSubtitle",
|
158 |
+
"format" => "required",
|
159 |
+
),
|
160 |
+
"Descriptions[0].PaymentDescription" => array(
|
161 |
+
"name" => "Descriptions[0].PaymentDescription",
|
162 |
+
"feed_name" => "Descriptions[0].PaymentDescription",
|
163 |
+
"format" => "required",
|
164 |
+
),
|
165 |
+
"Descriptions[0].ShippingDescription" => array(
|
166 |
+
"name" => "Descriptions[0].ShippingDescription",
|
167 |
+
"feed_name" => "Descriptions[0].ShippingDescription",
|
168 |
+
"format" => "required",
|
169 |
+
),
|
170 |
+
"Descriptions[0].WarrantyDescription" => array(
|
171 |
+
"name" => "Descriptions[0].WarrantyDescription",
|
172 |
+
"feed_name" => "Descriptions[0].WarrantyDescription",
|
173 |
+
"format" => "required",
|
174 |
+
),
|
175 |
+
"Descriptions[1].ProductTitle" => array(
|
176 |
+
"name" => "Descriptions[1].ProductTitle",
|
177 |
+
"feed_name" => "Descriptions[1].ProductTitle",
|
178 |
+
"format" => "required",
|
179 |
+
),
|
180 |
+
"Descriptions[1].ProductDescription" => array(
|
181 |
+
"name" => "Descriptions[1].ProductDescription",
|
182 |
+
"feed_name" => "Descriptions[1].ProductDescription",
|
183 |
+
"format" => "required",
|
184 |
+
),
|
185 |
+
"Descriptions[1].ProductSubtitle" => array(
|
186 |
+
"name" => "Descriptions[1].ProductSubtitle",
|
187 |
+
"feed_name" => "Descriptions[1].ProductSubtitle",
|
188 |
+
"format" => "required",
|
189 |
+
),
|
190 |
+
"Descriptions[1].PaymentDescription" => array(
|
191 |
+
"name" => "Descriptions[1].PaymentDescription",
|
192 |
+
"feed_name" => "Descriptions[1].PaymentDescription",
|
193 |
+
"format" => "required",
|
194 |
+
),
|
195 |
+
"Descriptions[1].ShippingDescription" => array(
|
196 |
+
"name" => "Descriptions[1].ShippingDescription",
|
197 |
+
"feed_name" => "Descriptions[1].ShippingDescription",
|
198 |
+
"format" => "required",
|
199 |
+
),
|
200 |
+
"Descriptions[1].WarrantyDescription" => array(
|
201 |
+
"name" => "Descriptions[1].WarrantyDescription",
|
202 |
+
"feed_name" => "Descriptions[1].WarrantyDescription",
|
203 |
+
"format" => "required",
|
204 |
+
),
|
205 |
+
"DraftImages[0]" => array(
|
206 |
+
"name" => "DraftImages[0]",
|
207 |
+
"feed_name" => "DraftImages[0]",
|
208 |
+
"format" => "required",
|
209 |
+
),
|
210 |
+
"DraftImages[1]" => array(
|
211 |
+
"name" => "DraftImages[1]",
|
212 |
+
"feed_name" => "DraftImages[1]",
|
213 |
+
"format" => "required",
|
214 |
+
),
|
215 |
+
"DraftImages[2]" => array(
|
216 |
+
"name" => "DraftImages[2]",
|
217 |
+
"feed_name" => "DraftImages[2]",
|
218 |
+
"format" => "required",
|
219 |
+
),
|
220 |
+
"DraftImages[3]" => array(
|
221 |
+
"name" => "DraftImages[3]",
|
222 |
+
"feed_name" => "DraftImages[3]",
|
223 |
+
"format" => "required",
|
224 |
+
),
|
225 |
+
"DraftImages[4]" => array(
|
226 |
+
"name" => "DraftImages[4]",
|
227 |
+
"feed_name" => "DraftImages[4]",
|
228 |
+
"format" => "required",
|
229 |
+
),
|
230 |
+
"DraftImages[5]" => array(
|
231 |
+
"name" => "DraftImages[5]",
|
232 |
+
"feed_name" => "DraftImages[5]",
|
233 |
+
"format" => "required",
|
234 |
+
),
|
235 |
+
"DraftImages[6]" => array(
|
236 |
+
"name" => "DraftImages[6]",
|
237 |
+
"feed_name" => "DraftImages[6]",
|
238 |
+
"format" => "required",
|
239 |
+
),
|
240 |
+
"DraftImages[7]" => array(
|
241 |
+
"name" => "DraftImages[7]",
|
242 |
+
"feed_name" => "DraftImages[7]",
|
243 |
+
"format" => "required",
|
244 |
+
),
|
245 |
+
"DraftImages[8]" => array(
|
246 |
+
"name" => "DraftImages[8]",
|
247 |
+
"feed_name" => "DraftImages[8]",
|
248 |
+
"format" => "required",
|
249 |
+
),
|
250 |
+
"DraftImages[9]" => array(
|
251 |
+
"name" => "DraftImages[9]",
|
252 |
+
"feed_name" => "DraftImages[9]",
|
253 |
+
"format" => "required",
|
254 |
+
),
|
255 |
+
"IsFixedPrice" => array(
|
256 |
+
"name" => "IsFixedPrice",
|
257 |
+
"feed_name" => "IsFixedPrice",
|
258 |
+
"format" => "required",
|
259 |
+
),
|
260 |
+
"PaymentCode" => array(
|
261 |
+
"name" => "PaymentCode",
|
262 |
+
"feed_name" => "PaymentCode",
|
263 |
+
"format" => "required",
|
264 |
+
),
|
265 |
+
"IsCumulativeShipping" => array(
|
266 |
+
"name" => "IsCumulativeShipping",
|
267 |
+
"feed_name" => "IsCumulativeShipping",
|
268 |
+
"format" => "required",
|
269 |
+
),
|
270 |
+
),
|
271 |
+
);
|
272 |
+
return $ricardo;
|
273 |
+
}
|
274 |
+
}
|
275 |
+
?>
|
classes/channels/class-shopmania_ro.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings for Shopmania Romania feeds
|
4 |
+
*/
|
5 |
+
class WooSEA_shopmania_ro {
|
6 |
+
public $shopmania_ro;
|
7 |
+
|
8 |
+
public static function get_channel_attributes() {
|
9 |
+
|
10 |
+
$sitename = get_option('blogname');
|
11 |
+
|
12 |
+
$shopmania_ro = array(
|
13 |
+
"Feed fields" => array(
|
14 |
+
"MPC" => array(
|
15 |
+
"name" => "MPC",
|
16 |
+
"feed_name" => "MPC",
|
17 |
+
"format" => "required",
|
18 |
+
"woo_suggest" => "id",
|
19 |
+
),
|
20 |
+
"Category" => array(
|
21 |
+
"name" => "Category",
|
22 |
+
"feed_name" => "Category",
|
23 |
+
"format" => "required",
|
24 |
+
"woo_suggest" => "categories",
|
25 |
+
),
|
26 |
+
"Manufacturer" => array(
|
27 |
+
"name" => "Manufacturer",
|
28 |
+
"feed_name" => "Manufacturer",
|
29 |
+
"format" => "required",
|
30 |
+
),
|
31 |
+
"MPN" => array(
|
32 |
+
"name" => "MPN",
|
33 |
+
"feed_name" => "MPN",
|
34 |
+
"format" => "required",
|
35 |
+
),
|
36 |
+
"Name" => array(
|
37 |
+
"name" => "Name",
|
38 |
+
"feed_name" => "Name",
|
39 |
+
"format" => "required",
|
40 |
+
"woo_suggest" => "title",
|
41 |
+
),
|
42 |
+
"Description" => array(
|
43 |
+
"name" => "Description",
|
44 |
+
"feed_name" => "Description",
|
45 |
+
"format" => "optional",
|
46 |
+
"woo_suggest" => "description",
|
47 |
+
),
|
48 |
+
"URL" => array(
|
49 |
+
"name" => "URL",
|
50 |
+
"feed_name" => "URL",
|
51 |
+
"format" => "required",
|
52 |
+
"woo_suggest" => "link",
|
53 |
+
),
|
54 |
+
"Image" => array(
|
55 |
+
"name" => "Image",
|
56 |
+
"feed_name" => "Image",
|
57 |
+
"format" => "required",
|
58 |
+
"woo_suggest" => "image",
|
59 |
+
),
|
60 |
+
"Price" => array(
|
61 |
+
"name" => "Price",
|
62 |
+
"feed_name" => "Price",
|
63 |
+
"format" => "required",
|
64 |
+
"woo_suggest" => "price",
|
65 |
+
),
|
66 |
+
"Currency" => array(
|
67 |
+
"name" => "Currency",
|
68 |
+
"feed_name" => "Currency",
|
69 |
+
"format" => "required",
|
70 |
+
),
|
71 |
+
"Shipping" => array(
|
72 |
+
"name" => "Shipping",
|
73 |
+
"feed_name" => "Shipping",
|
74 |
+
"format" => "required",
|
75 |
+
),
|
76 |
+
"Availability" => array(
|
77 |
+
"name" => "Availability",
|
78 |
+
"feed_name" => "Availability",
|
79 |
+
"format" => "required",
|
80 |
+
"woo_suggest" => "availability",
|
81 |
+
),
|
82 |
+
"GTIN" => array(
|
83 |
+
"name" => "GTIN",
|
84 |
+
"feed_name" => "GTIN",
|
85 |
+
"format" => "required",
|
86 |
+
),
|
87 |
+
),
|
88 |
+
);
|
89 |
+
return $shopmania_ro;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
?>
|
classes/channels/class-zbozi.php
CHANGED
@@ -180,6 +180,31 @@ class WooSEA_zbozi {
|
|
180 |
"feed_name" => "RELEASE_DATE",
|
181 |
"format" => "optional",
|
182 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
),
|
184 |
);
|
185 |
return $zbozi;
|
180 |
"feed_name" => "RELEASE_DATE",
|
181 |
"format" => "optional",
|
182 |
),
|
183 |
+
"LENGTH" => array(
|
184 |
+
"name" => "LENGTH",
|
185 |
+
"feed_name" => "LENGTH",
|
186 |
+
"format" => "optional",
|
187 |
+
),
|
188 |
+
"VOLUME" => array(
|
189 |
+
"name" => "VOLUME",
|
190 |
+
"feed_name" => "VOLUME",
|
191 |
+
"format" => "optional",
|
192 |
+
),
|
193 |
+
"SIZE" => array(
|
194 |
+
"name" => "SIZE",
|
195 |
+
"feed_name" => "SIZE",
|
196 |
+
"format" => "optional",
|
197 |
+
),
|
198 |
+
"COLOR" => array(
|
199 |
+
"name" => "COLOR",
|
200 |
+
"feed_name" => "COLOR",
|
201 |
+
"format" => "optional",
|
202 |
+
),
|
203 |
+
"PURPOSE" => array(
|
204 |
+
"name" => "PURPOSE",
|
205 |
+
"feed_name" => "PURPOSE",
|
206 |
+
"format" => "optional",
|
207 |
+
),
|
208 |
),
|
209 |
);
|
210 |
return $zbozi;
|
classes/class-activate.php
CHANGED
@@ -51,6 +51,13 @@ class WooSEA_Activation {
|
|
51 |
"taxonomy" => "google_shopping",
|
52 |
"utm_source" => "Google Local Product Inventory",
|
53 |
"type" => "Advertising" ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
"Bing Shopping" => array (
|
55 |
"channel_hash" => md5("Bing Shopping"),
|
56 |
"name" => "Bing Shopping",
|
@@ -64,7 +71,14 @@ class WooSEA_Activation {
|
|
64 |
"fields" => "facebook_drm",
|
65 |
"taxonomy" => "google_shopping",
|
66 |
"utm_source" => "Facebook Dynamic Ads",
|
67 |
-
"type" => "Advertising" )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
),
|
69 |
"Custom Feed" => array (
|
70 |
"Custom Feed" => array (
|
@@ -85,7 +99,7 @@ class WooSEA_Activation {
|
|
85 |
"ShopMania" => array (
|
86 |
"channel_hash" => md5("Shopmania"),
|
87 |
"name" => "Shopmania.com.ar",
|
88 |
-
"fields" => "
|
89 |
"taxonomy" => "none",
|
90 |
"utm_source" => "Shopmania.com.ar",
|
91 |
"type" => "Shopmania.com.ar" )
|
@@ -116,7 +130,7 @@ class WooSEA_Activation {
|
|
116 |
"ShopMania" => array (
|
117 |
"channel_hash" => md5("Shopmania.com.au"),
|
118 |
"name" => "Shopmania.com.au",
|
119 |
-
"fields" => "
|
120 |
"taxonomy" => "none",
|
121 |
"utm_source" => "Shopmania.com.au",
|
122 |
"type" => "Comparison shopping engine" ),
|
@@ -525,7 +539,7 @@ class WooSEA_Activation {
|
|
525 |
"ShopMania.fr" => array (
|
526 |
"channel_hash" => md5("ShopMania.fr"),
|
527 |
"name" => "ShopMania.fr",
|
528 |
-
"fields" => "
|
529 |
"taxonomy" => "none",
|
530 |
"utm_source" => "ShopMania.fr",
|
531 |
"type" => "Comparison shopping engine" ),
|
@@ -866,6 +880,13 @@ class WooSEA_Activation {
|
|
866 |
"taxonomy" => "none",
|
867 |
"utm_source" => "Skroutz.gr",
|
868 |
"type" => "Comparison shopping engine" ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
869 |
),
|
870 |
"Grenada" => array (),
|
871 |
"Guatemala" => array (),
|
@@ -878,7 +899,7 @@ class WooSEA_Activation {
|
|
878 |
"ShopMania" => array (
|
879 |
"channel_hash" => md5("ShopMania.hu"),
|
880 |
"name" => "ShopMania.hu",
|
881 |
-
"fields" => "
|
882 |
"taxonomy" => "none",
|
883 |
"utm_source" => "ShopMania.hu",
|
884 |
"type" => "Comparison shopping engine" ),
|
@@ -888,7 +909,7 @@ class WooSEA_Activation {
|
|
888 |
"ShopMania" => array (
|
889 |
"channel_hash" => md5("ShopMania.in"),
|
890 |
"name" => "ShopMania.in",
|
891 |
-
"fields" => "
|
892 |
"taxonomy" => "none",
|
893 |
"utm_source" => "ShopMania.in",
|
894 |
"type" => "Comparison shopping engine" ),
|
@@ -900,7 +921,7 @@ class WooSEA_Activation {
|
|
900 |
"ShopMania" => array (
|
901 |
"channel_hash" => md5("ShopMania.ie"),
|
902 |
"name" => "ShopMania.ie",
|
903 |
-
"fields" => "
|
904 |
"taxonomy" => "none",
|
905 |
"utm_source" => "ShopMania.ie",
|
906 |
"type" => "Comparison shopping engine" ),
|
@@ -939,7 +960,7 @@ class WooSEA_Activation {
|
|
939 |
"ShopMania" => array (
|
940 |
"channel_hash" => md5("ShopMania.it"),
|
941 |
"name" => "ShopMania.it",
|
942 |
-
"fields" => "
|
943 |
"taxonomy" => "none",
|
944 |
"utm_source" => "ShopMania.it",
|
945 |
"type" => "Comparison shopping engine" ),
|
@@ -978,7 +999,7 @@ class WooSEA_Activation {
|
|
978 |
"ShopMania" => array (
|
979 |
"channel_hash" => md5("ShopMania.jp"),
|
980 |
"name" => "ShopMania.jp",
|
981 |
-
"fields" => "
|
982 |
"taxonomy" => "none",
|
983 |
"utm_source" => "ShopMania.jp",
|
984 |
"type" => "Comparison shopping engine" ),
|
@@ -1023,7 +1044,7 @@ class WooSEA_Activation {
|
|
1023 |
"ShopMania" => array (
|
1024 |
"channel_hash" => md5("ShopMania.com.mx"),
|
1025 |
"name" => "ShopMania.com.mx",
|
1026 |
-
"fields" => "
|
1027 |
"taxonomy" => "none",
|
1028 |
"utm_source" => "ShopMania.com.mx",
|
1029 |
"type" => "Comparison shopping engine" ),
|
@@ -1235,7 +1256,7 @@ class WooSEA_Activation {
|
|
1235 |
"ShopMania" => array (
|
1236 |
"channel_hash" => md5("ShopMania.pl"),
|
1237 |
"name" => "ShopMania.pl",
|
1238 |
-
"fields" => "
|
1239 |
"taxonomy" => "none",
|
1240 |
"utm_source" => "ShoMania.pl",
|
1241 |
"type" => "Comparison shopping engine" ),
|
@@ -1258,7 +1279,7 @@ class WooSEA_Activation {
|
|
1258 |
"ShopMania" => array (
|
1259 |
"channel_hash" => md5("ShopMania.pt"),
|
1260 |
"name" => "ShopMania.pt",
|
1261 |
-
"fields" => "
|
1262 |
"taxonomy" => "none",
|
1263 |
"utm_source" => "ShoMania.pt",
|
1264 |
"type" => "Comparison shopping engine" ),
|
@@ -1282,10 +1303,18 @@ class WooSEA_Activation {
|
|
1282 |
"ShopMania" => array (
|
1283 |
"channel_hash" => md5("ShopMania.ro"),
|
1284 |
"name" => "ShopMania.ro",
|
1285 |
-
"fields" => "
|
1286 |
"taxonomy" => "none",
|
1287 |
"utm_source" => "ShoMania.ro",
|
1288 |
"type" => "Comparison shopping engine" ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1289 |
),
|
1290 |
"Russian Federation" => array (
|
1291 |
"Yandex" => array (
|
@@ -1309,7 +1338,7 @@ class WooSEA_Activation {
|
|
1309 |
"ShopMania" => array (
|
1310 |
"channel_hash" => md5("ShopMania.rs"),
|
1311 |
"name" => "ShopMania.rs",
|
1312 |
-
"fields" => "
|
1313 |
"taxonomy" => "none",
|
1314 |
"utm_source" => "ShopMania.rs",
|
1315 |
"type" => "Comparison shopping engine" ),
|
@@ -1321,7 +1350,7 @@ class WooSEA_Activation {
|
|
1321 |
"ShopMania" => array (
|
1322 |
"channel_hash" => md5("ShopMania.sk"),
|
1323 |
"name" => "ShopMania.sk",
|
1324 |
-
"fields" => "
|
1325 |
"taxonomy" => "none",
|
1326 |
"utm_source" => "ShopMania.sk",
|
1327 |
"type" => "Comparison shopping engine" ),
|
@@ -1332,10 +1361,17 @@ class WooSEA_Activation {
|
|
1332 |
"ShopMania" => array (
|
1333 |
"channel_hash" => md5("ShopMania.co.za"),
|
1334 |
"name" => "ShopMania.co.za",
|
1335 |
-
"fields" => "
|
1336 |
"taxonomy" => "none",
|
1337 |
"utm_source" => "ShopMania.co.za",
|
1338 |
"type" => "Comparison shopping engine" ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1339 |
),
|
1340 |
"South Sudan" => array (),
|
1341 |
"Spain" => array (
|
@@ -1424,12 +1460,12 @@ class WooSEA_Activation {
|
|
1424 |
"taxonomy" => "none",
|
1425 |
"utm_source" => "Kauftipp.ch",
|
1426 |
"type" => "Comparison shopping engine" ),
|
1427 |
-
"
|
1428 |
-
"channel_hash" => md5("
|
1429 |
-
"name" => "
|
1430 |
-
"fields" => "
|
1431 |
"taxonomy" => "none",
|
1432 |
-
"utm_source" => "
|
1433 |
"type" => "Marketplace" ),
|
1434 |
"Spartoo" => array (
|
1435 |
"channel_hash" => md5("Spartoo.ch"),
|
@@ -1592,7 +1628,7 @@ class WooSEA_Activation {
|
|
1592 |
"ShopMania" => array (
|
1593 |
"channel_hash" => md5("ShopMania.co.uk"),
|
1594 |
"name" => "ShapMania.co.uk",
|
1595 |
-
"fields" => "
|
1596 |
"taxonomy" => "none",
|
1597 |
"utm_source" => "ShopMania.co.uk",
|
1598 |
"type" => "Comparison shopping engine" ),
|
@@ -1692,7 +1728,7 @@ class WooSEA_Activation {
|
|
1692 |
"ShopMania" => array (
|
1693 |
"channel_hash" => md5("ShopMania"),
|
1694 |
"name" => "ShopMania.com",
|
1695 |
-
"fields" => "
|
1696 |
"taxonomy" => "none",
|
1697 |
"utm_source" => "ShopMania.com",
|
1698 |
"type" => "Comparison shopping engine" ),
|
@@ -1761,6 +1797,10 @@ class WooSEA_Activation {
|
|
1761 |
if (!wp_next_scheduled( 'woosea_check_license' ) ) {
|
1762 |
|
1763 |
if(!get_option("license_information")){
|
|
|
|
|
|
|
|
|
1764 |
$license_valid = "false";
|
1765 |
$message = "Thank you for becoming a user of our product feed pro plugin, much appreciated! Some of the features of this plugin have been locked as you are using the free version of this plugin. The added extra fields such as Brand and GTIN, WPML support, Aelia currency switcher support and the WooCommerce structured data bug fix are Elite features of this plugin. You can get <a href=\"https://adtribes.io/pro-vs-elite/?utm_source=$domain&utm_medium=plugin&utm_campaign=upgrade-elite\" target=\"_blank\">your license key here</a>.";
|
1766 |
$message_type = "notice notice-info is-dismissible";
|
@@ -1781,6 +1821,7 @@ class WooSEA_Activation {
|
|
1781 |
update_option ('structured_vat', 'no', 'yes');
|
1782 |
update_option ('add_unique_identifiers', 'no', 'yes');
|
1783 |
update_option ('add_wpml_support', 'no', 'yes');
|
|
|
1784 |
update_option ('add_aelia_support', 'no', 'yes');
|
1785 |
}
|
1786 |
|
51 |
"taxonomy" => "google_shopping",
|
52 |
"utm_source" => "Google Local Product Inventory",
|
53 |
"type" => "Advertising" ),
|
54 |
+
"Google Product Review Feed" => array (
|
55 |
+
"channel_hash" => md5("Google Product Review"),
|
56 |
+
"name" => "Google Product Review",
|
57 |
+
"fields" => "google_product_review",
|
58 |
+
"taxonomy" => "none",
|
59 |
+
"utm_source" => "Google Product Review",
|
60 |
+
"type" => "Advertising" ),
|
61 |
"Bing Shopping" => array (
|
62 |
"channel_hash" => md5("Bing Shopping"),
|
63 |
"name" => "Bing Shopping",
|
71 |
"fields" => "facebook_drm",
|
72 |
"taxonomy" => "google_shopping",
|
73 |
"utm_source" => "Facebook Dynamic Ads",
|
74 |
+
"type" => "Advertising" ),
|
75 |
+
"Pinterest" => array (
|
76 |
+
"channel_hash" => md5("Pinterest"),
|
77 |
+
"name" => "Pinterest",
|
78 |
+
"fields" => "pinterest",
|
79 |
+
"taxonomy" => "google_shopping",
|
80 |
+
"utm_source" => "Pinterest",
|
81 |
+
"type" => "Advertising" ),
|
82 |
),
|
83 |
"Custom Feed" => array (
|
84 |
"Custom Feed" => array (
|
99 |
"ShopMania" => array (
|
100 |
"channel_hash" => md5("Shopmania"),
|
101 |
"name" => "Shopmania.com.ar",
|
102 |
+
"fields" => "shopmania_ro",
|
103 |
"taxonomy" => "none",
|
104 |
"utm_source" => "Shopmania.com.ar",
|
105 |
"type" => "Shopmania.com.ar" )
|
130 |
"ShopMania" => array (
|
131 |
"channel_hash" => md5("Shopmania.com.au"),
|
132 |
"name" => "Shopmania.com.au",
|
133 |
+
"fields" => "shopmania_ro",
|
134 |
"taxonomy" => "none",
|
135 |
"utm_source" => "Shopmania.com.au",
|
136 |
"type" => "Comparison shopping engine" ),
|
539 |
"ShopMania.fr" => array (
|
540 |
"channel_hash" => md5("ShopMania.fr"),
|
541 |
"name" => "ShopMania.fr",
|
542 |
+
"fields" => "shopmania_ro",
|
543 |
"taxonomy" => "none",
|
544 |
"utm_source" => "ShopMania.fr",
|
545 |
"type" => "Comparison shopping engine" ),
|
880 |
"taxonomy" => "none",
|
881 |
"utm_source" => "Skroutz.gr",
|
882 |
"type" => "Comparison shopping engine" ),
|
883 |
+
"Glami" => array (
|
884 |
+
"channel_hash" => md5("Glami.gr"),
|
885 |
+
"name" => "Glami.gr",
|
886 |
+
"fields" => "glami",
|
887 |
+
"taxonomy" => "none",
|
888 |
+
"utm_source" => "Glami.gr",
|
889 |
+
"type" => "Comparison shopping engine" ),
|
890 |
),
|
891 |
"Grenada" => array (),
|
892 |
"Guatemala" => array (),
|
899 |
"ShopMania" => array (
|
900 |
"channel_hash" => md5("ShopMania.hu"),
|
901 |
"name" => "ShopMania.hu",
|
902 |
+
"fields" => "shopmania_ro",
|
903 |
"taxonomy" => "none",
|
904 |
"utm_source" => "ShopMania.hu",
|
905 |
"type" => "Comparison shopping engine" ),
|
909 |
"ShopMania" => array (
|
910 |
"channel_hash" => md5("ShopMania.in"),
|
911 |
"name" => "ShopMania.in",
|
912 |
+
"fields" => "shopmania_ro",
|
913 |
"taxonomy" => "none",
|
914 |
"utm_source" => "ShopMania.in",
|
915 |
"type" => "Comparison shopping engine" ),
|
921 |
"ShopMania" => array (
|
922 |
"channel_hash" => md5("ShopMania.ie"),
|
923 |
"name" => "ShopMania.ie",
|
924 |
+
"fields" => "shopmania_ro",
|
925 |
"taxonomy" => "none",
|
926 |
"utm_source" => "ShopMania.ie",
|
927 |
"type" => "Comparison shopping engine" ),
|
960 |
"ShopMania" => array (
|
961 |
"channel_hash" => md5("ShopMania.it"),
|
962 |
"name" => "ShopMania.it",
|
963 |
+
"fields" => "shopmania_ro",
|
964 |
"taxonomy" => "none",
|
965 |
"utm_source" => "ShopMania.it",
|
966 |
"type" => "Comparison shopping engine" ),
|
999 |
"ShopMania" => array (
|
1000 |
"channel_hash" => md5("ShopMania.jp"),
|
1001 |
"name" => "ShopMania.jp",
|
1002 |
+
"fields" => "shopmania_ro",
|
1003 |
"taxonomy" => "none",
|
1004 |
"utm_source" => "ShopMania.jp",
|
1005 |
"type" => "Comparison shopping engine" ),
|
1044 |
"ShopMania" => array (
|
1045 |
"channel_hash" => md5("ShopMania.com.mx"),
|
1046 |
"name" => "ShopMania.com.mx",
|
1047 |
+
"fields" => "shopmania_ro",
|
1048 |
"taxonomy" => "none",
|
1049 |
"utm_source" => "ShopMania.com.mx",
|
1050 |
"type" => "Comparison shopping engine" ),
|
1256 |
"ShopMania" => array (
|
1257 |
"channel_hash" => md5("ShopMania.pl"),
|
1258 |
"name" => "ShopMania.pl",
|
1259 |
+
"fields" => "shopmania_ro",
|
1260 |
"taxonomy" => "none",
|
1261 |
"utm_source" => "ShoMania.pl",
|
1262 |
"type" => "Comparison shopping engine" ),
|
1279 |
"ShopMania" => array (
|
1280 |
"channel_hash" => md5("ShopMania.pt"),
|
1281 |
"name" => "ShopMania.pt",
|
1282 |
+
"fields" => "shopmania_ro",
|
1283 |
"taxonomy" => "none",
|
1284 |
"utm_source" => "ShoMania.pt",
|
1285 |
"type" => "Comparison shopping engine" ),
|
1303 |
"ShopMania" => array (
|
1304 |
"channel_hash" => md5("ShopMania.ro"),
|
1305 |
"name" => "ShopMania.ro",
|
1306 |
+
"fields" => "shopmania_ro",
|
1307 |
"taxonomy" => "none",
|
1308 |
"utm_source" => "ShoMania.ro",
|
1309 |
"type" => "Comparison shopping engine" ),
|
1310 |
+
"Compari" => array (
|
1311 |
+
"channel_hash" => md5("Compari.ro"),
|
1312 |
+
"name" => "Compari.ro",
|
1313 |
+
"fields" => "compari_ro",
|
1314 |
+
"taxonomy" => "none",
|
1315 |
+
"utm_source" => "Compari.ro",
|
1316 |
+
"type" => "Comparison shopping engine" ),
|
1317 |
+
|
1318 |
),
|
1319 |
"Russian Federation" => array (
|
1320 |
"Yandex" => array (
|
1338 |
"ShopMania" => array (
|
1339 |
"channel_hash" => md5("ShopMania.rs"),
|
1340 |
"name" => "ShopMania.rs",
|
1341 |
+
"fields" => "shopmania_ro",
|
1342 |
"taxonomy" => "none",
|
1343 |
"utm_source" => "ShopMania.rs",
|
1344 |
"type" => "Comparison shopping engine" ),
|
1350 |
"ShopMania" => array (
|
1351 |
"channel_hash" => md5("ShopMania.sk"),
|
1352 |
"name" => "ShopMania.sk",
|
1353 |
+
"fields" => "shopmania_ro",
|
1354 |
"taxonomy" => "none",
|
1355 |
"utm_source" => "ShopMania.sk",
|
1356 |
"type" => "Comparison shopping engine" ),
|
1361 |
"ShopMania" => array (
|
1362 |
"channel_hash" => md5("ShopMania.co.za"),
|
1363 |
"name" => "ShopMania.co.za",
|
1364 |
+
"fields" => "shopmania_ro",
|
1365 |
"taxonomy" => "none",
|
1366 |
"utm_source" => "ShopMania.co.za",
|
1367 |
"type" => "Comparison shopping engine" ),
|
1368 |
+
"Pricecheck" => array (
|
1369 |
+
"channel_hash" => md5("Pricecheck.co.za"),
|
1370 |
+
"name" => "Pricecheck.co.za",
|
1371 |
+
"fields" => "pricecheck",
|
1372 |
+
"taxonomy" => "none",
|
1373 |
+
"utm_source" => "Pricecheck.co.za",
|
1374 |
+
"type" => "Comparison shopping engine" ),
|
1375 |
),
|
1376 |
"South Sudan" => array (),
|
1377 |
"Spain" => array (
|
1460 |
"taxonomy" => "none",
|
1461 |
"utm_source" => "Kauftipp.ch",
|
1462 |
"type" => "Comparison shopping engine" ),
|
1463 |
+
"Ricardo" => array (
|
1464 |
+
"channel_hash" => md5("Ricardo.ch"),
|
1465 |
+
"name" => "Ricardo.ch",
|
1466 |
+
"fields" => "ricardo",
|
1467 |
"taxonomy" => "none",
|
1468 |
+
"utm_source" => "Ricardo.ch",
|
1469 |
"type" => "Marketplace" ),
|
1470 |
"Spartoo" => array (
|
1471 |
"channel_hash" => md5("Spartoo.ch"),
|
1628 |
"ShopMania" => array (
|
1629 |
"channel_hash" => md5("ShopMania.co.uk"),
|
1630 |
"name" => "ShapMania.co.uk",
|
1631 |
+
"fields" => "shopmania_ro",
|
1632 |
"taxonomy" => "none",
|
1633 |
"utm_source" => "ShopMania.co.uk",
|
1634 |
"type" => "Comparison shopping engine" ),
|
1728 |
"ShopMania" => array (
|
1729 |
"channel_hash" => md5("ShopMania"),
|
1730 |
"name" => "ShopMania.com",
|
1731 |
+
"fields" => "shopmania_ro",
|
1732 |
"taxonomy" => "none",
|
1733 |
"utm_source" => "ShopMania.com",
|
1734 |
"type" => "Comparison shopping engine" ),
|
1797 |
if (!wp_next_scheduled( 'woosea_check_license' ) ) {
|
1798 |
|
1799 |
if(!get_option("license_information")){
|
1800 |
+
|
1801 |
+
$domain = $_SERVER['HTTP_HOST'];
|
1802 |
+
|
1803 |
+
$license_created = "";
|
1804 |
$license_valid = "false";
|
1805 |
$message = "Thank you for becoming a user of our product feed pro plugin, much appreciated! Some of the features of this plugin have been locked as you are using the free version of this plugin. The added extra fields such as Brand and GTIN, WPML support, Aelia currency switcher support and the WooCommerce structured data bug fix are Elite features of this plugin. You can get <a href=\"https://adtribes.io/pro-vs-elite/?utm_source=$domain&utm_medium=plugin&utm_campaign=upgrade-elite\" target=\"_blank\">your license key here</a>.";
|
1806 |
$message_type = "notice notice-info is-dismissible";
|
1821 |
update_option ('structured_vat', 'no', 'yes');
|
1822 |
update_option ('add_unique_identifiers', 'no', 'yes');
|
1823 |
update_option ('add_wpml_support', 'no', 'yes');
|
1824 |
+
update_option ('add_manipulation_support', 'no', 'yes');
|
1825 |
update_option ('add_aelia_support', 'no', 'yes');
|
1826 |
}
|
1827 |
|
classes/class-admin-notifications.php
CHANGED
@@ -54,63 +54,67 @@ class WooSEA_Get_Admin_Notifications {
|
|
54 |
|
55 |
switch($step){
|
56 |
case 0:
|
57 |
-
$message =
|
58 |
$message_type = "notice notice-info";
|
59 |
break;
|
60 |
case 1:
|
61 |
-
$message =
|
62 |
$message_type = "notice notice-info";
|
63 |
break;
|
64 |
case 2:
|
65 |
-
$message =
|
66 |
$message_type = "notice notice-info is-dismissible";
|
67 |
break;
|
68 |
case 3:
|
69 |
-
$message =
|
70 |
$message_type = "notice notice-info is-dismissible";
|
71 |
break;
|
72 |
case 4:
|
73 |
-
$message =
|
74 |
$message_type = "notice notice-info";
|
75 |
break;
|
76 |
case 5:
|
77 |
-
$message =
|
78 |
$message_type = "notice notice-info";
|
79 |
break;
|
80 |
case 6:
|
81 |
-
$message =
|
82 |
$message_type = "notice notice-info is-dismissible";
|
83 |
break;
|
84 |
case 7:
|
85 |
-
$message =
|
86 |
$message_type = "notice notice-info";
|
87 |
break;
|
88 |
case 8:
|
89 |
-
$message =
|
90 |
$message_type = "notice notice-info";
|
91 |
break;
|
92 |
case 9:
|
93 |
-
$message =
|
94 |
$message_type = "notice notice-error";
|
95 |
break;
|
96 |
case 10:
|
97 |
-
$message =
|
98 |
$message_type = "notice notice-info is-dismissible";
|
99 |
break;
|
100 |
case 11:
|
101 |
-
$message =
|
102 |
$message_type = "notice notice-error is-dismissible";
|
103 |
break;
|
104 |
case 12:
|
105 |
-
$message =
|
106 |
$message_type = "notice notice-error is-dismissible";
|
107 |
break;
|
108 |
case 13:
|
109 |
-
$message =
|
110 |
$message_type = "notice notice-error is-dismissible";
|
111 |
break;
|
112 |
case 14:
|
113 |
-
$message =
|
|
|
|
|
|
|
|
|
114 |
$message_type = "notice notice-info";
|
115 |
break;
|
116 |
}
|
54 |
|
55 |
switch($step){
|
56 |
case 0:
|
57 |
+
$message = __( 'Please select the country and channel for which you would like to create a new product feed. The channel drop-down will populate with relevant country channels once you selected a country. Filling in a project name is mandatory.','woosea' );
|
58 |
$message_type = "notice notice-info";
|
59 |
break;
|
60 |
case 1:
|
61 |
+
$message = __( 'Map your products or categories to the categories of your selected channel. For some channels adding their categorisation in the product feed is mandatory. Even when category mappings are not mandatory it is likely your products will get better visibility and higher conversions when mappings have been added.','woosea' );
|
62 |
$message_type = "notice notice-info";
|
63 |
break;
|
64 |
case 2:
|
65 |
+
$message = __( 'Please drag and drop the attributes you want to be in your product feed from left to right.','woosea' );
|
66 |
$message_type = "notice notice-info is-dismissible";
|
67 |
break;
|
68 |
case 3:
|
69 |
+
$message = __( 'Mapping your product categories to the channel categories will increase changes of getting all your products listed correctly, thus increase your conversion rates.','woosea' );
|
70 |
$message_type = "notice notice-info is-dismissible";
|
71 |
break;
|
72 |
case 4:
|
73 |
+
$message = __( 'Create filter and rules so exactly the right products end up in your product feed. These filters and rules are only eligable for the current product feed you are configuring and will not be used for other feeds.<br/><br/><strong>Filters:</strong> Exclude or include products that meet certain conditions. [<strong><i><a href="https://adtribes.io/how-to-create-filters-for-your-product-feed/" target="_blank">Detailed information and filter examples</a></i></strong>] or [<strong><i><a href="https://adtribes.io/create-a-product-feed-for-one-specific-category/" target="_blank">Create a product feed for just 1 category</a></i></strong>]<br/><strong>Rules:</strong> Change attribute values based on other attribute values or conditions.[<strong><i><a href="https://adtribes.io/how-to-create-rules/" target="_blank">Detailed information about rules and some examples</a></i></strong>]<br/><br/>Order of execution: the filters and rules will be executed in the order of creation.','woosea' );
|
74 |
$message_type = "notice notice-info";
|
75 |
break;
|
76 |
case 5:
|
77 |
+
$message = __( '<strong>Google Analytics UTM codes:</strong><br/>Adding Google Analytics UTM codes is not mandatory, it will however enable you to get detailed insights into how your products are performing in Google Analytics reporting and allow you to tweak and tune your campaign making it more profitable. We strongly advise you to add the Google Analytics tracking. When enabled the plugin will append the Google Analytics UTM parameters to your landingpage URL\'s.','woosea' );
|
78 |
$message_type = "notice notice-info";
|
79 |
break;
|
80 |
case 6:
|
81 |
+
$message = __( 'Your product feed is now being created, please be patient. Your feed details will be displayed when generation of the product feed has been finished.','woosea' );
|
82 |
$message_type = "notice notice-info is-dismissible";
|
83 |
break;
|
84 |
case 7:
|
85 |
+
$message = __( 'For the selected channel the attributes shown below are mandatory, please map them to your product attributes. We\'ve already pre-filled a lot of mappings so all you have to do is check those and map the ones that are left blank or add new ones by hitting the \'Add field mapping\' button.<br/><br/>[<strong><i><a href="https://adtribes.io/how-to-use-static-values-and-create-fake-content-for-your-product-feed/" target="_blank">Learn how to use static values</a></i></strong>]','woosea' );
|
86 |
$message_type = "notice notice-info";
|
87 |
break;
|
88 |
case 8:
|
89 |
+
$message = __( 'Manage your projects, such as the mappings and filter rules, below. Hit the refresh icon for the project to run with its new settings or just to refresh the product feed. When a project is being processed it is not possible to make changes to its configuration.','woosea' );
|
90 |
$message_type = "notice notice-info";
|
91 |
break;
|
92 |
case 9:
|
93 |
+
$message = __( 'You cannot create product feeds yet, please install WooCommerce first.','woosea' );
|
94 |
$message_type = "notice notice-error";
|
95 |
break;
|
96 |
case 10:
|
97 |
+
$message = __( 'The graph shows the amount of products in this product feed, measured after every scheduled and/or manually triggered refresh.','woosea' );
|
98 |
$message_type = "notice notice-info is-dismissible";
|
99 |
break;
|
100 |
case 11:
|
101 |
+
$message = __( 'You are running an old PHP version. This plugin might not work or be really slow. Please upgrade to PHP version 7.0 or newer.','woosea' );
|
102 |
$message_type = "notice notice-error is-dismissible";
|
103 |
break;
|
104 |
case 12:
|
105 |
+
$message = __( 'We are sorry but it seems you have disabled your WP CRON. This plugin creates product feeds in batches and needs the WP CRON to be active for doing so. Please enable the WP CRON in your wp-config.php file and re-activate this plugin before creating a product feed.','woosea' );
|
106 |
$message_type = "notice notice-error is-dismissible";
|
107 |
break;
|
108 |
case 13:
|
109 |
+
$message = __( 'We are sorry but it seems you are running an old version of WooCommerce. This plugin requires WooCommerce version 3.0 at least. Please upgrade to the latest version of WooCommerce before creating a product feed.','woosea' );
|
110 |
$message_type = "notice notice-error is-dismissible";
|
111 |
break;
|
112 |
case 14:
|
113 |
+
$message = __( 'Add important attributes, such as Brand, GTIN, condition and many more to create a perfect Google Shopping feed or fix the WooCommerce structured data bug so less products get disapproved in Google\'s Merchant Center.','woosea' );
|
114 |
+
$message_type = "notice notice-info";
|
115 |
+
break;
|
116 |
+
case 15:
|
117 |
+
$message = __( 'Manipulate your product data to improve the quality of your product feeds and online marketing campaigns. Manipulating your product data is an extremely powerfull feature. Check out an example we have created in our blog post: <b><u><a href="https://adtribes.io/feature-product-data-manipulation/" target="_blank">Manipulating product data</a></u></b>','woosea' );
|
118 |
$message_type = "notice notice-info";
|
119 |
break;
|
120 |
}
|
classes/class-attributes.php
CHANGED
@@ -50,7 +50,6 @@ private function get_dynamic_attributes(){
|
|
50 |
|
51 |
$no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","yst_prominent_words","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
|
52 |
$taxonomies = get_taxonomies();
|
53 |
-
|
54 |
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
55 |
|
56 |
# get custom taxonomy values for a product
|
@@ -79,7 +78,8 @@ private function get_custom_attributes() {
|
|
79 |
global $wpdb;
|
80 |
$list = array();
|
81 |
$sql = "SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%'
|
82 |
-
AND meta.meta_key NOT LIKE 'pyre%' AND meta.meta_key NOT LIKE 'sbg_%' AND meta.meta_key NOT LIKE '
|
|
|
83 |
$data = $wpdb->get_results($sql);
|
84 |
|
85 |
if (count($data)) {
|
@@ -186,6 +186,7 @@ public function get_mapping_attributes_dropdown() {
|
|
186 |
"sku" => "SKU",
|
187 |
"sku_id" => "SKU_ID (Facebook)",
|
188 |
"sku_item_group_id" => "SKU_ITEM_GROUP_ID (Facebook)",
|
|
|
189 |
"title" => "Product name",
|
190 |
"mother_title" => "Product name mother product",
|
191 |
"description" => "Product description",
|
@@ -203,6 +204,7 @@ public function get_mapping_attributes_dropdown() {
|
|
203 |
"sale_price_end_date" => "Sale end date",
|
204 |
"sale_price_effective_date" => "Sale price effective date",
|
205 |
"link" => "Link",
|
|
|
206 |
"currency" => "Currency",
|
207 |
"categories" => "Category",
|
208 |
"category_link" => "Category link",
|
@@ -215,6 +217,7 @@ public function get_mapping_attributes_dropdown() {
|
|
215 |
"exclude_from_catalog" => "Excluded from catalog",
|
216 |
"exclude_from_search" => "Excluded from search",
|
217 |
"exclude_from_all" => "Excluded from all (hidden)",
|
|
|
218 |
"publication_date" => "Publication date",
|
219 |
"item_group_id" => "Item group ID",
|
220 |
"weight" => "Weight",
|
@@ -269,13 +272,14 @@ public function get_mapping_attributes_dropdown() {
|
|
269 |
*/
|
270 |
$dynamic_attributes = $this->get_dynamic_attributes();
|
271 |
|
|
|
272 |
if($dynamic_attributes){
|
273 |
$dropdown .= "<optgroup label='Dynamic attributes'><strong>Dynamic attributes</strong>";
|
274 |
|
275 |
foreach ($dynamic_attributes as $key => $value) {
|
276 |
-
|
277 |
$dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
|
278 |
-
|
279 |
}
|
280 |
|
281 |
$dropdown .="</optgroup>";
|
@@ -310,7 +314,8 @@ public function get_mapping_attributes_dropdown() {
|
|
310 |
*/
|
311 |
$dropdown .= "<optgroup label='Other fields'><strong>Other fields</strong>";
|
312 |
$dropdown .= "<option value='product_tag'>Product tags</option>";
|
313 |
-
$dropdown .= "<option value='menu_order'>Menu order</option>";
|
|
|
314 |
$dropdown .= "</optgroup>";
|
315 |
|
316 |
// Did the user checked extra attributes
|
@@ -321,9 +326,9 @@ public function get_mapping_attributes_dropdown() {
|
|
321 |
$dropdown .= "<optgroup label='Added Custom Attributes'><strong>Added Custom Attributes</strong>";
|
322 |
|
323 |
foreach ($extra_attributes as $key => $value) {
|
324 |
-
|
325 |
$dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
|
326 |
-
|
327 |
}
|
328 |
$dropdown .="</optgroup>";
|
329 |
}
|
@@ -339,11 +344,13 @@ public function get_mapping_attributes_dropdown() {
|
|
339 |
"sku" => "SKU",
|
340 |
"sku_id" => "SKU_ID (Facebook)",
|
341 |
"sku_item_group_id" => "SKU_ITEM_GROUP_ID (Facebook)",
|
|
|
342 |
"title" => "Product name",
|
343 |
"mother_title" => "Product name mother product",
|
344 |
"description" => "Product description",
|
345 |
"short_description" => "Product short description",
|
346 |
"link" => "Link",
|
|
|
347 |
"image" => "Main image",
|
348 |
"feature_image" => "Feature image",
|
349 |
"product_type" => "Product Type",
|
@@ -351,6 +358,7 @@ public function get_mapping_attributes_dropdown() {
|
|
351 |
"exclude_from_catalog" => "Excluded from catalog",
|
352 |
"exclude_from_search" => "Excluded from search",
|
353 |
"exclude_from_all" => "Excluded from all (hidden)",
|
|
|
354 |
"publication_date" => "Publication date",
|
355 |
"currency" => "Currency",
|
356 |
"categories" => "Category",
|
@@ -402,6 +410,17 @@ public function get_mapping_attributes_dropdown() {
|
|
402 |
|
403 |
$attributes = array_merge($attributes, $images);
|
404 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
if(is_array($this->get_dynamic_attributes())){
|
406 |
$dynamic_attributes = $this->get_dynamic_attributes();
|
407 |
array_walk($dynamic_attributes, function(&$value, $key) { $value .= ' (Dynamic attribute)';});
|
@@ -414,14 +433,6 @@ public function get_mapping_attributes_dropdown() {
|
|
414 |
$attributes = array_merge($attributes, $custom_attributes);
|
415 |
}
|
416 |
|
417 |
-
$static = array(
|
418 |
-
"installment" => "Installment",
|
419 |
-
"static_value" => "Static value",
|
420 |
-
"calculated" => "Plugin calculation",
|
421 |
-
"product_tag" => "Product tags",
|
422 |
-
"menu_order" => "Menu order",
|
423 |
-
);
|
424 |
-
|
425 |
$attributes = array_merge($attributes, $static);
|
426 |
|
427 |
// Did the user checked extra attributes
|
50 |
|
51 |
$no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","yst_prominent_words","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
|
52 |
$taxonomies = get_taxonomies();
|
|
|
53 |
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
54 |
|
55 |
# get custom taxonomy values for a product
|
78 |
global $wpdb;
|
79 |
$list = array();
|
80 |
$sql = "SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%'
|
81 |
+
AND meta.meta_key NOT LIKE 'pyre%' AND meta.meta_key NOT LIKE 'sbg_%' AND meta.meta_key NOT LIKE 'rp_%' AND (meta.meta_key NOT LIKE '\_%' OR meta.meta_key LIKE '\_woosea%' OR meta.meta_key LIKE '\_yoast%' OR meta.meta_key='_product_attributes') GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
|
82 |
+
|
83 |
$data = $wpdb->get_results($sql);
|
84 |
|
85 |
if (count($data)) {
|
186 |
"sku" => "SKU",
|
187 |
"sku_id" => "SKU_ID (Facebook)",
|
188 |
"sku_item_group_id" => "SKU_ITEM_GROUP_ID (Facebook)",
|
189 |
+
"wc_post_id_product_id" => "Wc_post_id_product_id (Facebook)",
|
190 |
"title" => "Product name",
|
191 |
"mother_title" => "Product name mother product",
|
192 |
"description" => "Product description",
|
204 |
"sale_price_end_date" => "Sale end date",
|
205 |
"sale_price_effective_date" => "Sale price effective date",
|
206 |
"link" => "Link",
|
207 |
+
"add_to_cart_link" => "Add to cart link",
|
208 |
"currency" => "Currency",
|
209 |
"categories" => "Category",
|
210 |
"category_link" => "Category link",
|
217 |
"exclude_from_catalog" => "Excluded from catalog",
|
218 |
"exclude_from_search" => "Excluded from search",
|
219 |
"exclude_from_all" => "Excluded from all (hidden)",
|
220 |
+
"featured" => "Featured",
|
221 |
"publication_date" => "Publication date",
|
222 |
"item_group_id" => "Item group ID",
|
223 |
"weight" => "Weight",
|
272 |
*/
|
273 |
$dynamic_attributes = $this->get_dynamic_attributes();
|
274 |
|
275 |
+
|
276 |
if($dynamic_attributes){
|
277 |
$dropdown .= "<optgroup label='Dynamic attributes'><strong>Dynamic attributes</strong>";
|
278 |
|
279 |
foreach ($dynamic_attributes as $key => $value) {
|
280 |
+
// if (strpos($value, 0, 1) !== "_") {
|
281 |
$dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
|
282 |
+
// }
|
283 |
}
|
284 |
|
285 |
$dropdown .="</optgroup>";
|
314 |
*/
|
315 |
$dropdown .= "<optgroup label='Other fields'><strong>Other fields</strong>";
|
316 |
$dropdown .= "<option value='product_tag'>Product tags</option>";
|
317 |
+
$dropdown .= "<option value='menu_order'>Menu order</option>";
|
318 |
+
$dropdown .= "<option value='reviews'>Reviews</option>";
|
319 |
$dropdown .= "</optgroup>";
|
320 |
|
321 |
// Did the user checked extra attributes
|
326 |
$dropdown .= "<optgroup label='Added Custom Attributes'><strong>Added Custom Attributes</strong>";
|
327 |
|
328 |
foreach ($extra_attributes as $key => $value) {
|
329 |
+
// if (strpos($value, 0, 1) !== "_") {
|
330 |
$dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
|
331 |
+
// }
|
332 |
}
|
333 |
$dropdown .="</optgroup>";
|
334 |
}
|
344 |
"sku" => "SKU",
|
345 |
"sku_id" => "SKU_ID (Facebook)",
|
346 |
"sku_item_group_id" => "SKU_ITEM_GROUP_ID (Facebook)",
|
347 |
+
"wc_post_id_product_id" => "Wc_post_id_product_id (Facebook)",
|
348 |
"title" => "Product name",
|
349 |
"mother_title" => "Product name mother product",
|
350 |
"description" => "Product description",
|
351 |
"short_description" => "Product short description",
|
352 |
"link" => "Link",
|
353 |
+
"add_to_cart_link" => "Add to cart link",
|
354 |
"image" => "Main image",
|
355 |
"feature_image" => "Feature image",
|
356 |
"product_type" => "Product Type",
|
358 |
"exclude_from_catalog" => "Excluded from catalog",
|
359 |
"exclude_from_search" => "Excluded from search",
|
360 |
"exclude_from_all" => "Excluded from all (hidden)",
|
361 |
+
"featured" => "Featured",
|
362 |
"publication_date" => "Publication date",
|
363 |
"currency" => "Currency",
|
364 |
"categories" => "Category",
|
410 |
|
411 |
$attributes = array_merge($attributes, $images);
|
412 |
|
413 |
+
$static = array(
|
414 |
+
"installment" => "Installment",
|
415 |
+
"static_value" => "Static value",
|
416 |
+
"calculated" => "Plugin calculation",
|
417 |
+
"product_tag" => "Product tags",
|
418 |
+
"menu_order" => "Menu order",
|
419 |
+
"reviews" => "Reviews",
|
420 |
+
);
|
421 |
+
|
422 |
+
$attributes = array_merge($attributes, $static);
|
423 |
+
|
424 |
if(is_array($this->get_dynamic_attributes())){
|
425 |
$dynamic_attributes = $this->get_dynamic_attributes();
|
426 |
array_walk($dynamic_attributes, function(&$value, $key) { $value .= ' (Dynamic attribute)';});
|
433 |
$attributes = array_merge($attributes, $custom_attributes);
|
434 |
}
|
435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
$attributes = array_merge($attributes, $static);
|
437 |
|
438 |
// Did the user checked extra attributes
|
classes/class-get-products.php
CHANGED
@@ -19,23 +19,6 @@ class WooSEA_Get_Products {
|
|
19 |
$this->get_products = array();
|
20 |
}
|
21 |
|
22 |
-
/**
|
23 |
-
* Get all product cats for a product by ID, including hierarchy
|
24 |
-
* @param int $product_id
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
// public function wc_get_product_cat_ids( $product_id ) {
|
28 |
-
//
|
29 |
-
// $product_cats = wp_get_post_terms( $product_id, 'product_cat', array( "fields" => "ids" ) );
|
30 |
-
//
|
31 |
-
// error_log(print_r($product_cats, TRUE));
|
32 |
-
//
|
33 |
-
// foreach ( $product_cats as $product_cat ) {
|
34 |
-
// $product_cats = array_merge( $product_cats, get_ancestors( $product_cat, 'product_cat' ) );
|
35 |
-
// }
|
36 |
-
// return $product_cats;
|
37 |
-
// }
|
38 |
-
|
39 |
/**
|
40 |
* Function to add CDATA brackets to title, short_description and description attributes
|
41 |
*/
|
@@ -68,9 +51,14 @@ class WooSEA_Get_Products {
|
|
68 |
*/
|
69 |
public function woosea_get_reviews ( $product_data, $product ) {
|
70 |
$approved_reviews = array();
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
$reviews = get_comments(array(
|
73 |
-
'post_id' => $
|
74 |
'comment_type' => 'review',
|
75 |
'comment_approved' => 1,
|
76 |
));
|
@@ -78,23 +66,49 @@ class WooSEA_Get_Products {
|
|
78 |
// Loop through all product reviews for this specific products (ternary operators)
|
79 |
foreach($reviews as $review_raw){
|
80 |
$review = array();
|
81 |
-
$review['review_product_id'] = $product_data['id'];
|
82 |
-
$review['review_product_ids'] = array(
|
83 |
-
"gtins" => empty($product_data['gtins']) ? '' : $product_data['gtins'],
|
84 |
-
"mpns" => empty($product_data['mpns']) ? '' : $product_data['mpns'],
|
85 |
-
"skus" => empty($product_data['skus']) ? '' : $product_data['skus'],
|
86 |
-
"brand" => empty($product_data['brands']) ? '' : $product_data['brands'],
|
87 |
-
);
|
88 |
$review['review_reviewer_image'] = empty($product_data['reviewer_image']) ? '' : $product_data['reviewer_image'];
|
89 |
$review['review_ratings'] = get_comment_meta( $review_raw->comment_ID, 'rating', true);
|
90 |
-
$review['
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
$review['review_timestamp'] = $review_raw->comment_date;
|
94 |
-
|
95 |
-
|
96 |
-
$review['
|
97 |
-
$review['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
$review['review_product_name'] = $product_data['title'];
|
99 |
$review['review_url'] = $product_data['link'];
|
100 |
$review['review_product_url'] = $product_data['link'];
|
@@ -105,7 +119,6 @@ class WooSEA_Get_Products {
|
|
105 |
return $approved_reviews;
|
106 |
}
|
107 |
|
108 |
-
|
109 |
/**
|
110 |
* Strip unwanted UTF chars from string
|
111 |
*/
|
@@ -209,7 +222,7 @@ class WooSEA_Get_Products {
|
|
209 |
$product_attr = unserialize($value->type);
|
210 |
|
211 |
foreach ($product_attr as $key => $arr_value) {
|
212 |
-
$value_display = str_replace("_", " ",$arr_value['name']);
|
213 |
$list[$key] = ucfirst($value_display);
|
214 |
}
|
215 |
}
|
@@ -282,7 +295,7 @@ class WooSEA_Get_Products {
|
|
282 |
}
|
283 |
}
|
284 |
return $chain;
|
285 |
-
}
|
286 |
|
287 |
/**
|
288 |
* Get all configured shipping zones
|
@@ -411,6 +424,7 @@ class WooSEA_Get_Products {
|
|
411 |
// Do we need to convert the shipping costswith the Aelia Currency Switcher
|
412 |
if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
|
413 |
if(!array_key_exists('base_currency', $project_config)){
|
|
|
414 |
$from_currency = get_woocommerce_currency();
|
415 |
} else {
|
416 |
$from_currency = $project_config['base_currency'];
|
@@ -422,7 +436,6 @@ class WooSEA_Get_Products {
|
|
422 |
|
423 |
if($taxable == "taxable"){
|
424 |
foreach ($tax_rates as $k => $w){
|
425 |
-
|
426 |
if((isset($w['shipping'])) and ($w['shipping'] == "yes")){
|
427 |
$rate = (($w['rate']+100)/100);
|
428 |
$shipping_cost = $shipping_cost*$rate;
|
@@ -527,7 +540,6 @@ class WooSEA_Get_Products {
|
|
527 |
// This shipping zone has postal codes so multiply the zone details
|
528 |
$nr_postals = count($postal_code);
|
529 |
if ($nr_postals > 0){
|
530 |
-
//if(!empty($shipping_cost)){
|
531 |
for ($x = 0; $x <= count($postal_code); ) {
|
532 |
$zone_count++;
|
533 |
if(!empty($postal_code[$x])){
|
@@ -536,7 +548,6 @@ class WooSEA_Get_Products {
|
|
536 |
}
|
537 |
$x++;
|
538 |
}
|
539 |
-
//}
|
540 |
} else {
|
541 |
$zone_count++;
|
542 |
$shipping_arr[$zone_count] = $zone_details;
|
@@ -579,7 +590,6 @@ class WooSEA_Get_Products {
|
|
579 |
fclose($fp);
|
580 |
}
|
581 |
|
582 |
-
|
583 |
/**
|
584 |
* Creates XML root and header for productfeed
|
585 |
*/
|
@@ -714,12 +724,22 @@ class WooSEA_Get_Products {
|
|
714 |
$shop->addChild('name', htmlspecialchars($feed_config['projectname']));
|
715 |
$shop->addChild('company', get_bloginfo());
|
716 |
$shop->addChild('url', site_url());
|
717 |
-
|
718 |
$currencies = $shop->addChild('currencies');
|
719 |
$currency = $currencies->addChild('currency');
|
720 |
$currency->addAttribute('id', $main_currency);
|
721 |
$currency->addAttribute('rate', '1');
|
722 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
$args = array(
|
724 |
'taxonomy' => "product_cat",
|
725 |
);
|
@@ -741,10 +761,20 @@ class WooSEA_Get_Products {
|
|
741 |
$shop->addChild('agency', 'AdTribes.io');
|
742 |
$shop->addChild('email', 'support@adtribes.io');
|
743 |
$xml->asXML($file);
|
744 |
-
} elseif ($feed_config['name'] == "
|
745 |
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><SHOP></SHOP>');
|
746 |
$xml->addAttribute('xmlns', 'http://www.zbozi.cz/ns/offer/1.0');
|
747 |
$xml->asXML($file);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
} elseif ($feed_config['name'] == "Zap.co.il") {
|
749 |
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><STORE></STORE>');
|
750 |
$xml->addChild('datetime', date('Y-m-d H:i:s'));
|
@@ -770,9 +800,10 @@ class WooSEA_Get_Products {
|
|
770 |
$xml->addAttribute('xsi:noNamespaceSchemaLocation', 'http://www.google.com/shopping/reviews/schema/product/2.2/product_reviews.xsd');
|
771 |
$xml->addChild('version', '2.2');
|
772 |
$aggregator = $xml->addChild('aggregator');
|
773 |
-
$aggregator->addChild('name', '
|
774 |
$publisher = $xml->addChild('publisher');
|
775 |
-
$publisher->addChild('name', '
|
|
|
776 |
$xml->asXML($file);
|
777 |
} else {
|
778 |
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><products></products>');
|
@@ -789,37 +820,152 @@ class WooSEA_Get_Products {
|
|
789 |
$aantal = count($products);
|
790 |
|
791 |
if ($aantal > 0){
|
792 |
-
|
793 |
-
|
|
|
794 |
}
|
795 |
|
796 |
// For ZAP template
|
797 |
-
if ($feed_config['name'] == "Zap.co.il") {
|
798 |
$productz = $xml->addChild('PRODUCTS');
|
799 |
}
|
800 |
|
801 |
// For Google Product review template
|
802 |
-
if($feed_config['name'] == "Google Product Review"){
|
803 |
-
$
|
804 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
|
806 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
|
|
|
|
|
808 |
if (is_array ( $value ) ) {
|
809 |
if ($feed_config['name'] == "Yandex") {
|
810 |
-
$product = $offers->addChild('offer');
|
811 |
-
} elseif ($feed_config['name'] == "Heureka.cz" || $feed_config['name'] == "Zbozi.cz") {
|
812 |
$product = $xml->addChild('SHOPITEM');
|
813 |
} elseif ($feed_config['name'] == "Zap.co.il") {
|
814 |
-
$product = $
|
815 |
} elseif ($feed_config['name'] == "Salidzini.lv") {
|
816 |
$product = $xml->addChild('item');
|
817 |
} elseif ($feed_config['name'] == "Trovaprezzi.it") {
|
818 |
$product = $xml->addChild('Offer');
|
|
|
|
|
819 |
} elseif ($feed_config['name'] == "Google Product Review") {
|
820 |
-
|
821 |
} else {
|
822 |
-
$
|
|
|
|
|
823 |
}
|
824 |
|
825 |
foreach ($value as $k => $v){
|
@@ -921,10 +1067,28 @@ class WooSEA_Get_Products {
|
|
921 |
if ($feed_config['fields'] != 'standard'){
|
922 |
$k = $this->get_alternative_key ($channel_attributes, $k);
|
923 |
}
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
928 |
}
|
929 |
}
|
930 |
}
|
@@ -966,9 +1130,13 @@ class WooSEA_Get_Products {
|
|
966 |
}
|
967 |
|
968 |
// Check if there is a channel feed class that we need to use
|
|
|
|
|
|
|
|
|
969 |
if ($feed_config['fields'] != 'standard'){
|
970 |
if (!class_exists('WooSEA_'.$feed_config['fields'])){
|
971 |
-
require plugin_dir_path(__FILE__) . '
|
972 |
$channel_class = "WooSEA_".$feed_config['fields'];
|
973 |
$channel_attributes = $channel_class::get_channel_attributes();
|
974 |
update_option ('channel_attributes', $channel_attributes, 'yes');
|
@@ -1108,15 +1276,11 @@ class WooSEA_Get_Products {
|
|
1108 |
$nr_batches = ceil($published_products/750);
|
1109 |
|
1110 |
if($published_products > 50000){
|
1111 |
-
$nr_batches = ceil($published_products/
|
1112 |
} else {
|
1113 |
$nr_batches = ceil($published_products/750);
|
1114 |
}
|
1115 |
}
|
1116 |
-
|
1117 |
-
// TEST BATCHES
|
1118 |
-
// $nr_batches = 5;
|
1119 |
-
|
1120 |
$offset_step_size = ceil($published_products/$nr_batches);
|
1121 |
|
1122 |
/**
|
@@ -1188,18 +1352,9 @@ class WooSEA_Get_Products {
|
|
1188 |
'post_type' => $post_type,
|
1189 |
'post_status' => 'publish',
|
1190 |
'fields' => 'ids',
|
1191 |
-
'no_found_rows' => true
|
1192 |
);
|
1193 |
$prods = new WP_Query($wp_query);
|
1194 |
-
|
1195 |
-
// Logging the WP query and WP query output has been disabled as there are no structural issues with the plugin
|
1196 |
-
|
1197 |
-
// Log query for debugging purposes
|
1198 |
-
// $log_query = WooSEA_Get_Products::woosea_create_query_log($wp_query, "query");
|
1199 |
-
|
1200 |
-
// Log the query output for debugging purposes
|
1201 |
-
// $log_query = WooSEA_Get_Products::woosea_create_query_log($prods, "query_output");
|
1202 |
-
|
1203 |
$shipping_zones = $this->woosea_get_shipping_zones();
|
1204 |
|
1205 |
while ($prods->have_posts()) : $prods->the_post();
|
@@ -1234,21 +1389,28 @@ class WooSEA_Get_Products {
|
|
1234 |
$product_data['mother_title'] = $this->woosea_utf8_for_xml( $product_data['mother_title'] );
|
1235 |
$product_data['sku'] = $product->get_sku();
|
1236 |
$product_data['sku_id'] = $product_data['id'];
|
|
|
1237 |
$product_data['publication_date'] = get_the_date('d-m-y G:i:s');
|
|
|
1238 |
|
1239 |
// Start product visibility logic
|
1240 |
$product_data['exclude_from_catalog'] = "no";
|
1241 |
$product_data['exclude_from_search'] = "no";
|
1242 |
$product_data['exclude_from_all'] = "no";
|
|
|
1243 |
|
1244 |
$visibility_list = wp_get_post_terms(get_the_ID(), 'product_visibility', array("fields" => "all"));
|
|
|
1245 |
foreach($visibility_list as $visibility_single){
|
1246 |
if($visibility_single->slug == "exclude-from-catalog"){
|
1247 |
$product_data['exclude_from_catalog'] = "yes";
|
1248 |
}
|
1249 |
if($visibility_single->slug == "exclude-from-search"){
|
1250 |
$product_data['exclude_from_search'] = "yes";
|
1251 |
-
}
|
|
|
|
|
|
|
1252 |
}
|
1253 |
|
1254 |
if(($product_data['exclude_from_search'] == "yes") AND ($product_data['exclude_from_catalog'] == "yes")){
|
@@ -1268,8 +1430,24 @@ class WooSEA_Get_Products {
|
|
1268 |
}
|
1269 |
}
|
1270 |
}
|
|
|
|
|
|
|
|
|
|
|
1271 |
|
1272 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1273 |
|
1274 |
// This is a category fix for Yandex, probably needed for all channels
|
1275 |
// When Yoast is not installed and a product is linked to multiple categories
|
@@ -1304,7 +1482,11 @@ class WooSEA_Get_Products {
|
|
1304 |
|
1305 |
if(($primary_cat_id) AND ($primary_cat_id > 0)){
|
1306 |
$product_cat = get_term($primary_cat_id, 'product_cat');
|
1307 |
-
|
|
|
|
|
|
|
|
|
1308 |
if(isset($product_cat->name)) {
|
1309 |
$catname = $product_cat->name;
|
1310 |
$catlink = get_category_link($product_cat->term_id);
|
@@ -1330,6 +1512,11 @@ class WooSEA_Get_Products {
|
|
1330 |
}
|
1331 |
} else {
|
1332 |
foreach ($categories as $key => $value){
|
|
|
|
|
|
|
|
|
|
|
1333 |
if (!$catname){
|
1334 |
$product_cat = get_term($value, 'product_cat');
|
1335 |
|
@@ -1350,9 +1537,10 @@ class WooSEA_Get_Products {
|
|
1350 |
}
|
1351 |
} else {
|
1352 |
foreach ($categories as $key => $value){
|
|
|
1353 |
if (!$catname){
|
1354 |
$product_cat = get_term($value, 'product_cat');
|
1355 |
-
|
1356 |
// Check if there are mother categories
|
1357 |
$parent_categories = get_ancestors($product_cat->term_id, 'product_cat');
|
1358 |
$category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
|
@@ -1415,8 +1603,8 @@ class WooSEA_Get_Products {
|
|
1415 |
$product_data['short_description'] = str_replace(" ", "", $product_data['short_description']);
|
1416 |
|
1417 |
// Strip strange UTF chars
|
1418 |
-
$product_data['description'] = $this->woosea_utf8_for_xml(
|
1419 |
-
$product_data['short_description'] = $this->woosea_utf8_for_xml(
|
1420 |
|
1421 |
/**
|
1422 |
* Check of we need to add Google Analytics UTM parameters
|
@@ -1433,7 +1621,7 @@ class WooSEA_Get_Products {
|
|
1433 |
$product_data['condition'] = "New";
|
1434 |
}
|
1435 |
$product_data['availability'] = $this->get_stock( $this->childID );
|
1436 |
-
|
1437 |
/**
|
1438 |
* When 'Enable stock management at product level is active
|
1439 |
* availability will always return out of stock, even when the stock quantity > 0
|
@@ -1442,6 +1630,8 @@ class WooSEA_Get_Products {
|
|
1442 |
$stock_status = $product->get_stock_status();
|
1443 |
if ($stock_status == "outofstock"){
|
1444 |
$product_data['availability'] = "out of stock";
|
|
|
|
|
1445 |
} else {
|
1446 |
$product_data['availability'] = "in stock";
|
1447 |
}
|
@@ -1489,6 +1679,12 @@ class WooSEA_Get_Products {
|
|
1489 |
}
|
1490 |
$product_data['rating_total'] = $product->get_rating_count();
|
1491 |
$product_data['rating_average'] = $product->get_average_rating();
|
|
|
|
|
|
|
|
|
|
|
|
|
1492 |
$product_data['shipping'] = 0;
|
1493 |
|
1494 |
$tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
|
@@ -1498,6 +1694,7 @@ class WooSEA_Get_Products {
|
|
1498 |
|
1499 |
// Get product prices
|
1500 |
$product_data['price'] = wc_get_price_including_tax($product, array('price'=> $product->get_price()));
|
|
|
1501 |
// Override price when WCML price is different than the non-translated price
|
1502 |
if((isset($project_config['WCML'])) AND ($product_data['price'] !== $wcml_price)){
|
1503 |
$product_data['price'] = $wcml_price;
|
@@ -1508,6 +1705,27 @@ class WooSEA_Get_Products {
|
|
1508 |
$product_data['sale_price'] = "";
|
1509 |
}
|
1510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1511 |
if(!empty($tax_rates)){
|
1512 |
foreach ($tax_rates as $tk => $tv){
|
1513 |
if($tv['rate'] > 0){
|
@@ -1544,7 +1762,7 @@ class WooSEA_Get_Products {
|
|
1544 |
if($product_data['sale_price'] > 0){
|
1545 |
$price = $product_data['sale_price'];
|
1546 |
}
|
1547 |
-
|
1548 |
// Do we need to convert all of the above prices with the Aelia Currency Switcher
|
1549 |
if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
|
1550 |
if(!array_key_exists('base_currency', $project_config)){
|
@@ -1553,19 +1771,21 @@ class WooSEA_Get_Products {
|
|
1553 |
$from_currency = $project_config['base_currency'];
|
1554 |
}
|
1555 |
|
1556 |
-
|
1557 |
-
$product_data['price'] =
|
1558 |
$product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
|
1559 |
$product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price'], $from_currency, $project_config['AELIA']);
|
1560 |
$product_data['price_forced'] = apply_filters('wc_aelia_cs_convert', $product_data['price_forced'], $from_currency, $project_config['AELIA']);
|
1561 |
-
|
|
|
|
|
1562 |
if($product->get_sale_price()){
|
1563 |
$product_data['sale_price_forced'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price_forced'], $from_currency, $project_config['AELIA']);
|
1564 |
}
|
1565 |
$product_data['net_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_price'], $from_currency, $project_config['AELIA']);
|
1566 |
$product_data['net_regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_regular_price'], $from_currency, $project_config['AELIA']);
|
1567 |
$product_data['net_sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_sale_price'], $from_currency, $project_config['AELIA']);
|
1568 |
-
|
1569 |
// Get Aelia manually inserted currency prices
|
1570 |
if($product->is_type('simple')){
|
1571 |
$regular_aelia_prices = get_post_meta($product_data['id'], '_regular_currency_prices', true);
|
@@ -1587,6 +1807,14 @@ class WooSEA_Get_Products {
|
|
1587 |
}
|
1588 |
}
|
1589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1590 |
if($product->is_type('simple')){
|
1591 |
$sale_aelia_prices = get_post_meta($product_data['id'], '_sale_currency_prices', true);
|
1592 |
} else {
|
@@ -1610,6 +1838,7 @@ class WooSEA_Get_Products {
|
|
1610 |
}
|
1611 |
|
1612 |
// Localize the price attributes
|
|
|
1613 |
$product_data['price'] = wc_format_localized_price($product_data['price']);
|
1614 |
$product_data['regular_price'] = wc_format_localized_price($product_data['regular_price']);
|
1615 |
$product_data['sale_price'] = wc_format_localized_price($product_data['sale_price']);
|
@@ -1720,9 +1949,9 @@ class WooSEA_Get_Products {
|
|
1720 |
}
|
1721 |
|
1722 |
/**
|
1723 |
-
* Get Custom Attributes for Single products
|
1724 |
*/
|
1725 |
-
if ($product->is_type('simple')){
|
1726 |
|
1727 |
$custom_attributes = $this->get_custom_attributes( $product_data['id'] );
|
1728 |
|
@@ -1739,8 +1968,19 @@ class WooSEA_Get_Products {
|
|
1739 |
if(($custom_kk == "_woosea_condition") && ($custom_value == "")){
|
1740 |
$custom_value = $product_data['condition'];
|
1741 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1742 |
$product_data[$new_key] = $custom_value;
|
1743 |
}
|
|
|
1744 |
/**
|
1745 |
* We need to check if this product has individual custom product attributes
|
1746 |
*/
|
@@ -1763,7 +2003,7 @@ class WooSEA_Get_Products {
|
|
1763 |
/**
|
1764 |
* Get Product Attributes for Single products
|
1765 |
*/
|
1766 |
-
if ($product->is_type('simple')){
|
1767 |
$single_attributes = $product->get_attributes();
|
1768 |
|
1769 |
foreach ($single_attributes as $attribute){
|
@@ -1781,25 +2021,29 @@ class WooSEA_Get_Products {
|
|
1781 |
}
|
1782 |
|
1783 |
// Get product reviews for Google Product Review Feeds
|
1784 |
-
|
1785 |
|
1786 |
/**
|
1787 |
* Versioned products need a seperate approach
|
1788 |
* Get data for these products based on the mother products item group id
|
1789 |
*/
|
1790 |
-
|
1791 |
-
|
1792 |
$product_variations = new WC_Product_Variation( $product_data['id'] );
|
1793 |
-
|
1794 |
|
1795 |
// Determine the default variation product
|
1796 |
-
$variation_pass = "true";
|
1797 |
$mother_product = new WC_Product( $product_data['item_group_id'] );
|
1798 |
$def_attributes = $mother_product->get_default_attributes();
|
1799 |
$diff_result = array_diff($variations, $def_attributes);
|
1800 |
|
1801 |
if(isset($project_config['default_variations']) AND (!empty($diff_result))){
|
1802 |
-
|
|
|
|
|
|
|
|
|
|
|
1803 |
}
|
1804 |
|
1805 |
$append = "";
|
@@ -1871,7 +2115,6 @@ class WooSEA_Get_Products {
|
|
1871 |
}
|
1872 |
}
|
1873 |
|
1874 |
-
|
1875 |
/**
|
1876 |
* Although this is a product variation we also need to grap the Dynamic attributes belonging to the simple mother prodict
|
1877 |
*/
|
@@ -1933,31 +2176,28 @@ class WooSEA_Get_Products {
|
|
1933 |
*/
|
1934 |
$custom_attributes = $this->get_custom_attributes( $product_data['id'] );
|
1935 |
|
1936 |
-
|
1937 |
-
|
1938 |
-
$custom_value = get_post_meta( $product_data['id'], $custom_kk, true );
|
1939 |
-
|
1940 |
-
// Product variant brand is empty, grap that of the mother product
|
1941 |
-
if(($custom_kk == "_woosea_brand") && ($custom_value == "")){
|
1942 |
-
$custom_value = get_post_meta( $product_data['item_group_id'], $custom_kk, true );
|
1943 |
-
}
|
1944 |
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
|
1950 |
-
|
|
|
|
|
|
|
1951 |
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
}
|
1960 |
-
|
1961 |
|
1962 |
/**
|
1963 |
* We need to check if this product has individual custom product attributes
|
@@ -2002,7 +2242,16 @@ class WooSEA_Get_Products {
|
|
2002 |
}
|
2003 |
|
2004 |
// Get versioned product categories
|
2005 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006 |
|
2007 |
// This is a category fix for Yandex, probably needed for all channels
|
2008 |
// When Yoast is not installed and a product is linked to multiple categories
|
@@ -2025,8 +2274,6 @@ class WooSEA_Get_Products {
|
|
2025 |
$categories = $cat_alt;
|
2026 |
}
|
2027 |
|
2028 |
-
|
2029 |
-
|
2030 |
// Check if the Yoast plugin is installed and active
|
2031 |
if ( class_exists('WPSEO_Primary_Term') ){
|
2032 |
|
@@ -2111,22 +2358,21 @@ class WooSEA_Get_Products {
|
|
2111 |
$product_data['raw_categories'] = $catname;
|
2112 |
} else {
|
2113 |
foreach ($categories as $key => $value){
|
2114 |
-
|
2115 |
$product_cat = get_term($value, 'product_cat');
|
2116 |
-
|
2117 |
if($product_cat->parent > 0){
|
2118 |
$set_parent = $product_cat->parent;
|
2119 |
}
|
2120 |
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
} else {
|
2131 |
$product_cat = get_term($value, 'product_cat');
|
2132 |
|
@@ -2139,7 +2385,7 @@ class WooSEA_Get_Products {
|
|
2139 |
$catname_concat = $product_cat->name;
|
2140 |
$catlink_concat = get_term_link($value,'product_cat');
|
2141 |
}
|
2142 |
-
$catname
|
2143 |
$catlink .= "||".$catlink_concat;
|
2144 |
}
|
2145 |
}
|
@@ -2148,7 +2394,9 @@ class WooSEA_Get_Products {
|
|
2148 |
$product_data['raw_categories'] = $catname;
|
2149 |
$product_data['category_link'] = $catlink;
|
2150 |
$product_data['categories'] = $catname;
|
2151 |
-
|
|
|
|
|
2152 |
/**
|
2153 |
* In order to prevent XML formatting errors in Google's Merchant center
|
2154 |
* we will add CDATA brackets to the title and description attributes
|
@@ -2163,13 +2411,13 @@ class WooSEA_Get_Products {
|
|
2163 |
$product_data = $this->woosea_exclude_individual( $product_data );
|
2164 |
|
2165 |
/**
|
2166 |
-
*
|
2167 |
*/
|
2168 |
-
if (array_key_exists('
|
2169 |
if(is_array($product_data)){
|
2170 |
-
$product_data = $this->
|
2171 |
}
|
2172 |
-
}
|
2173 |
|
2174 |
/**
|
2175 |
* Filter execution
|
@@ -2193,6 +2441,15 @@ class WooSEA_Get_Products {
|
|
2193 |
}
|
2194 |
}
|
2195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2196 |
/**
|
2197 |
* When a product is a variable product we need to delete the original product from the feed, only the originals are allowed
|
2198 |
*/
|
@@ -2249,7 +2506,11 @@ class WooSEA_Get_Products {
|
|
2249 |
}
|
2250 |
} else {
|
2251 |
if((strlen($attr_value['mapfrom'])) AND (array_key_exists($attr_value['mapfrom'], $product_data))){
|
2252 |
-
$
|
|
|
|
|
|
|
|
|
2253 |
} else {
|
2254 |
$attr_line = "''";
|
2255 |
}
|
@@ -2279,7 +2540,20 @@ class WooSEA_Get_Products {
|
|
2279 |
$product_tag_str = ltrim($product_tag_str, ",");
|
2280 |
|
2281 |
$attr_line .= ",'".$product_tag_str."'";
|
2282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2283 |
} else {
|
2284 |
$shipping_str = "";
|
2285 |
foreach ($product_data[$attr_value['mapfrom']] as $key => $value){
|
@@ -2302,7 +2576,11 @@ class WooSEA_Get_Products {
|
|
2302 |
}
|
2303 |
} else {
|
2304 |
if(strlen($product_data[$attr_value['mapfrom']])){
|
2305 |
-
|
|
|
|
|
|
|
|
|
2306 |
} else {
|
2307 |
$attr_line .= ",''";
|
2308 |
}
|
@@ -2391,6 +2669,7 @@ class WooSEA_Get_Products {
|
|
2391 |
if(key_exists($attr_value['mapfrom'],$product_data)){
|
2392 |
|
2393 |
if(is_array($product_data[$attr_value['mapfrom']])){
|
|
|
2394 |
if($attr_value['mapfrom'] == "product_tag"){
|
2395 |
$product_tag_str = "";
|
2396 |
|
@@ -2401,7 +2680,54 @@ class WooSEA_Get_Products {
|
|
2401 |
$product_tag_str = ltrim($product_tag_str, ",");
|
2402 |
$product_tag_str = rtrim($product_tag_str, ",");
|
2403 |
|
2404 |
-
$xml_product[$attr_value['attribute']] = "$product_tag_str";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2405 |
} else {
|
2406 |
$shipping_str = "";
|
2407 |
foreach ($product_data[$attr_value['mapfrom']] as $key => $value){
|
@@ -2409,27 +2735,27 @@ class WooSEA_Get_Products {
|
|
2409 |
|
2410 |
foreach($value as $k => $v){
|
2411 |
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
|
|
2424 |
}
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
$shipping_str = str_replace("||:", "||", $shipping_str);
|
2431 |
|
2432 |
-
|
2433 |
}
|
2434 |
} else {
|
2435 |
if(array_key_exists($attr_value['attribute'], $xml_product)){
|
@@ -2440,6 +2766,8 @@ class WooSEA_Get_Products {
|
|
2440 |
|
2441 |
if(($attr_value['attribute'] == "g:link") OR ($attr_value['attribute'] == "link")){
|
2442 |
$xml_product[$attr_value['attribute']] = "$attr_value[prefix] ". $product_data[$attr_value['mapfrom']] ."$attr_value[suffix]";
|
|
|
|
|
2443 |
} elseif(($attr_value['attribute'] == "g:id") OR ($attr_value['attribute'] == "id") OR ($attr_value['attribute'] == "g:item_group_id")){
|
2444 |
$xml_product[$attr_value['attribute']] = "$attr_value[prefix]". $product_data[$attr_value['mapfrom']] ."$attr_value[suffix]";
|
2445 |
} else {
|
@@ -2587,6 +2915,8 @@ class WooSEA_Get_Products {
|
|
2587 |
|
2588 |
if (!copy($tmp_file, $new_file)) {
|
2589 |
error_log("Copy of file failed");
|
|
|
|
|
2590 |
}
|
2591 |
// END
|
2592 |
|
@@ -2619,6 +2949,8 @@ class WooSEA_Get_Products {
|
|
2619 |
|
2620 |
if (!copy($tmp_file, $new_file)) {
|
2621 |
error_log("Copy of file failed - small file");
|
|
|
|
|
2622 |
}
|
2623 |
// END
|
2624 |
|
@@ -2786,14 +3118,29 @@ class WooSEA_Get_Products {
|
|
2786 |
// Strip slashes
|
2787 |
$pm_array['criteria'] = str_replace("\\","",$pm_array['criteria']);
|
2788 |
$pm_array['criteria'] = str_replace("/","",$pm_array['criteria']);
|
|
|
2789 |
$original_cat = str_replace("\\","",$original_cat);
|
2790 |
$original_cat = str_replace("/","",$original_cat);
|
|
|
2791 |
|
2792 |
// First check if there is a category mapping for this specific product
|
2793 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2794 |
$category_pieces = explode("-", $pm_array['map_to_category']);
|
2795 |
$tmp_cat = $category_pieces[0];
|
2796 |
$match = "true";
|
|
|
|
|
|
|
|
|
|
|
|
|
2797 |
}
|
2798 |
}
|
2799 |
|
@@ -2809,6 +3156,51 @@ class WooSEA_Get_Products {
|
|
2809 |
return $product_data;
|
2810 |
}
|
2811 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2812 |
/**
|
2813 |
* Execute project rules
|
2814 |
*/
|
@@ -2828,11 +3220,13 @@ class WooSEA_Get_Products {
|
|
2828 |
$pr_array['than_attribute'] = $pd_key;
|
2829 |
}
|
2830 |
|
2831 |
-
|
2832 |
-
|
|
|
2833 |
$pr_array['than_attribute'] = "categories";
|
2834 |
-
|
2835 |
-
|
|
|
2836 |
}
|
2837 |
|
2838 |
// Make sure that rules on numerics are on true numerics
|
@@ -2840,14 +3234,12 @@ class WooSEA_Get_Products {
|
|
2840 |
$pd_value = strtr($pd_value, ',', '.');
|
2841 |
}
|
2842 |
|
2843 |
-
//$tmp_numeric = round($pd_value);
|
2844 |
if (((is_numeric($pd_value)) AND ($pr_array['than_attribute'] != "shipping"))){
|
2845 |
|
2846 |
// Rules for numeric values
|
2847 |
switch ($pr_array['condition']) {
|
2848 |
case($pr_array['condition'] = "contains"):
|
2849 |
if ((preg_match('/'.$pr_array['criteria'].'/', $pd_value))){
|
2850 |
-
// $product_data[$pr_array['than_attribute']] = $pr_array['newvalue'];
|
2851 |
$product_data[$pr_array['than_attribute']] = str_replace($pr_array['criteria'], $pr_array['newvalue'], $pd_value);
|
2852 |
}
|
2853 |
break;
|
@@ -3011,12 +3403,17 @@ class WooSEA_Get_Products {
|
|
3011 |
case($pr_array['condition'] = "contains"):
|
3012 |
if ((preg_match('/'.$pr_array['criteria'].'/', $pd_value))){
|
3013 |
// Specifically for shipping price rules
|
3014 |
-
if(
|
3015 |
-
|
3016 |
-
|
3017 |
-
$
|
3018 |
-
|
|
|
|
|
|
|
|
|
3019 |
} else {
|
|
|
3020 |
$product_data[$pr_array['than_attribute']] = $pr_array['newvalue'];
|
3021 |
}
|
3022 |
}
|
@@ -3120,7 +3517,11 @@ class WooSEA_Get_Products {
|
|
3120 |
|
3121 |
case($pr_array['condition'] = "empty"):
|
3122 |
if(empty($product_data[$pr_array['attribute']])){
|
3123 |
-
$product_data[$pr_array['than_attribute']]
|
|
|
|
|
|
|
|
|
3124 |
}
|
3125 |
break;
|
3126 |
case($pr_array['condition'] = "replace"):
|
@@ -3187,11 +3588,13 @@ class WooSEA_Get_Products {
|
|
3187 |
|
3188 |
if(in_array($pd_key, $pr_array, TRUE)){
|
3189 |
|
3190 |
-
if($pd_key == "price"){
|
3191 |
-
$pd_value = @number_format($pd_value,2);
|
3192 |
-
}
|
3193 |
-
|
3194 |
if (is_numeric($pd_value)){
|
|
|
|
|
|
|
|
|
|
|
|
|
3195 |
// Rules for numeric values
|
3196 |
switch ($pr_array['condition']) {
|
3197 |
case($pr_array['condition'] = "contains"):
|
@@ -3209,44 +3612,44 @@ class WooSEA_Get_Products {
|
|
3209 |
}
|
3210 |
break;
|
3211 |
case($pr_array['condition'] = "="):
|
3212 |
-
if (($
|
3213 |
$allowed = 0;
|
3214 |
-
} elseif (($
|
3215 |
$allowed = 0;
|
3216 |
}
|
3217 |
break;
|
3218 |
case($pr_array['condition'] = "!="):
|
3219 |
-
if (($
|
3220 |
$allowed = 1;
|
3221 |
-
} elseif (($
|
3222 |
$allowed = 0;
|
3223 |
}
|
3224 |
break;
|
3225 |
case($pr_array['condition'] = ">"):
|
3226 |
-
if (($
|
3227 |
$allowed = 0;
|
3228 |
-
} elseif (($
|
3229 |
$allowed = 0;
|
3230 |
}
|
3231 |
break;
|
3232 |
case($pr_array['condition'] = ">="):
|
3233 |
-
if (($
|
3234 |
$allowed = 0;
|
3235 |
-
} elseif (($
|
3236 |
$allowed = 0;
|
3237 |
}
|
3238 |
break;
|
3239 |
case($pr_array['condition'] = "<"):
|
3240 |
-
if (($
|
3241 |
$allowed = 0;
|
3242 |
-
} elseif (($
|
3243 |
$allowed = 0;
|
3244 |
}
|
3245 |
break;
|
3246 |
case($pr_array['condition'] = "=<"):
|
3247 |
-
if (($
|
3248 |
$allowed = 0;
|
3249 |
-
} elseif (($
|
3250 |
$allowed = 0;
|
3251 |
}
|
3252 |
case($pr_array['condition'] = "empty"):
|
@@ -3364,7 +3767,7 @@ class WooSEA_Get_Products {
|
|
3364 |
if($pr_array['than'] == "include_only"){
|
3365 |
$allowed = 0;
|
3366 |
} else {
|
3367 |
-
$allowed =
|
3368 |
}
|
3369 |
break;
|
3370 |
case($pr_array['condition'] = "containsnot"):
|
@@ -3378,7 +3781,7 @@ class WooSEA_Get_Products {
|
|
3378 |
if($pr_array['than'] == "include_only"){
|
3379 |
$allowed = 0;
|
3380 |
} else {
|
3381 |
-
$allowed =
|
3382 |
}
|
3383 |
break;
|
3384 |
case($pr_array['condition'] = "!="):
|
19 |
$this->get_products = array();
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Function to add CDATA brackets to title, short_description and description attributes
|
24 |
*/
|
51 |
*/
|
52 |
public function woosea_get_reviews ( $product_data, $product ) {
|
53 |
$approved_reviews = array();
|
54 |
+
$prod_id = $product_data['id'];
|
55 |
+
|
56 |
+
if($product_data['product_type'] == "variation"){
|
57 |
+
$prod_id = $product_data['item_group_id'];
|
58 |
+
}
|
59 |
|
60 |
$reviews = get_comments(array(
|
61 |
+
'post_id' => $prod_id,
|
62 |
'comment_type' => 'review',
|
63 |
'comment_approved' => 1,
|
64 |
));
|
66 |
// Loop through all product reviews for this specific products (ternary operators)
|
67 |
foreach($reviews as $review_raw){
|
68 |
$review = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
$review['review_reviewer_image'] = empty($product_data['reviewer_image']) ? '' : $product_data['reviewer_image'];
|
70 |
$review['review_ratings'] = get_comment_meta( $review_raw->comment_ID, 'rating', true);
|
71 |
+
$review['review_id'] = $review_raw->comment_ID;
|
72 |
+
|
73 |
+
// Names need to be anonomyzed
|
74 |
+
$name_pieces = explode(" ", $review_raw->comment_author);
|
75 |
+
$nr_name_pieces = count($name_pieces);
|
76 |
+
$cnt = 0;
|
77 |
+
$name = "";
|
78 |
+
foreach($name_pieces as $n_piece){
|
79 |
+
$cnt++;
|
80 |
+
if($cnt == $nr_name_pieces){
|
81 |
+
$n_piece = substr($n_piece, 0, 1);
|
82 |
+
}
|
83 |
+
$name .= $n_piece." ";
|
84 |
+
}
|
85 |
+
|
86 |
+
// Remove strange charachters from reviewer name
|
87 |
+
$review['reviewer_name'] = $this->rip_tags(trim(ucfirst($name)));
|
88 |
+
$review['reviewer_name'] = html_entity_decode((str_replace("\r", "", $review['reviewer_name'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
89 |
+
$review['reviewer_name'] = preg_replace( '/\[(.*?)\]/', ' ', $review['reviewer_name'] );
|
90 |
+
$review['reviewer_name'] = str_replace(" ", "", $review['reviewer_name']);
|
91 |
+
$review['reviewer+name'] = $this->woosea_utf8_for_xml( $review['reviewer_name'] );
|
92 |
+
|
93 |
+
$review['reviewer_id'] = $review_raw->user_id;
|
94 |
$review['review_timestamp'] = $review_raw->comment_date;
|
95 |
+
|
96 |
+
// Remove strange characters from review title
|
97 |
+
$review['title'] = empty($product_data['title']) ? '' : $product_data['title'];
|
98 |
+
$review['title'] = $this->rip_tags($review['title']);
|
99 |
+
$review['title'] = html_entity_decode((str_replace("\r", "", $review['title'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
100 |
+
$review['title'] = preg_replace( '/\[(.*?)\]/', ' ', $review['title'] );
|
101 |
+
$review['title'] = str_replace(" ", "", $review['title']);
|
102 |
+
$review['title'] = $this->woosea_utf8_for_xml( $review['title'] );
|
103 |
+
|
104 |
+
// Remove strange charchters from review content
|
105 |
+
$review['content'] = $review_raw->comment_content;
|
106 |
+
$review['content'] = $this->rip_tags($review['content']);
|
107 |
+
$review['content'] = html_entity_decode((str_replace("\r", "", $review['content'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
108 |
+
$review['content'] = preg_replace( '/\[(.*?)\]/', ' ', $review['content'] );
|
109 |
+
$review['content'] = str_replace(" ", "", $review['content']);
|
110 |
+
$review['content'] = $this->woosea_utf8_for_xml( $review['content'] );
|
111 |
+
|
112 |
$review['review_product_name'] = $product_data['title'];
|
113 |
$review['review_url'] = $product_data['link'];
|
114 |
$review['review_product_url'] = $product_data['link'];
|
119 |
return $approved_reviews;
|
120 |
}
|
121 |
|
|
|
122 |
/**
|
123 |
* Strip unwanted UTF chars from string
|
124 |
*/
|
222 |
$product_attr = unserialize($value->type);
|
223 |
|
224 |
foreach ($product_attr as $key => $arr_value) {
|
225 |
+
$value_display = @str_replace("_", " ",$arr_value['name']);
|
226 |
$list[$key] = ucfirst($value_display);
|
227 |
}
|
228 |
}
|
295 |
}
|
296 |
}
|
297 |
return $chain;
|
298 |
+
}
|
299 |
|
300 |
/**
|
301 |
* Get all configured shipping zones
|
424 |
// Do we need to convert the shipping costswith the Aelia Currency Switcher
|
425 |
if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
|
426 |
if(!array_key_exists('base_currency', $project_config)){
|
427 |
+
// Get the WooCommerce base currency
|
428 |
$from_currency = get_woocommerce_currency();
|
429 |
} else {
|
430 |
$from_currency = $project_config['base_currency'];
|
436 |
|
437 |
if($taxable == "taxable"){
|
438 |
foreach ($tax_rates as $k => $w){
|
|
|
439 |
if((isset($w['shipping'])) and ($w['shipping'] == "yes")){
|
440 |
$rate = (($w['rate']+100)/100);
|
441 |
$shipping_cost = $shipping_cost*$rate;
|
540 |
// This shipping zone has postal codes so multiply the zone details
|
541 |
$nr_postals = count($postal_code);
|
542 |
if ($nr_postals > 0){
|
|
|
543 |
for ($x = 0; $x <= count($postal_code); ) {
|
544 |
$zone_count++;
|
545 |
if(!empty($postal_code[$x])){
|
548 |
}
|
549 |
$x++;
|
550 |
}
|
|
|
551 |
} else {
|
552 |
$zone_count++;
|
553 |
$shipping_arr[$zone_count] = $zone_details;
|
590 |
fclose($fp);
|
591 |
}
|
592 |
|
|
|
593 |
/**
|
594 |
* Creates XML root and header for productfeed
|
595 |
*/
|
724 |
$shop->addChild('name', htmlspecialchars($feed_config['projectname']));
|
725 |
$shop->addChild('company', get_bloginfo());
|
726 |
$shop->addChild('url', site_url());
|
727 |
+
//$shop->addChild('platform', 'WooCommerce');
|
728 |
$currencies = $shop->addChild('currencies');
|
729 |
$currency = $currencies->addChild('currency');
|
730 |
$currency->addAttribute('id', $main_currency);
|
731 |
$currency->addAttribute('rate', '1');
|
732 |
|
733 |
+
// Switch to configured WPML language
|
734 |
+
if(isset($feed_config['WPML'])){
|
735 |
+
if ( function_exists('icl_object_id') ) {
|
736 |
+
global $sitepress;
|
737 |
+
$original_lang = ICL_LANGUAGE_CODE; // Save the current language
|
738 |
+
$new_lang = $feed_config['WPML']; // The language in which you want to get the terms
|
739 |
+
$sitepress->switch_lang($new_lang); // Switch to new language
|
740 |
+
}
|
741 |
+
}
|
742 |
+
|
743 |
$args = array(
|
744 |
'taxonomy' => "product_cat",
|
745 |
);
|
761 |
$shop->addChild('agency', 'AdTribes.io');
|
762 |
$shop->addChild('email', 'support@adtribes.io');
|
763 |
$xml->asXML($file);
|
764 |
+
} elseif ($feed_config['name'] == "Zbozi.cz") {
|
765 |
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><SHOP></SHOP>');
|
766 |
$xml->addAttribute('xmlns', 'http://www.zbozi.cz/ns/offer/1.0');
|
767 |
$xml->asXML($file);
|
768 |
+
} elseif ($feed_config['name'] == "Glami.gr") {
|
769 |
+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><SHOP></SHOP>');
|
770 |
+
$xml->asXML($file);
|
771 |
+
} elseif ($feed_config['name'] == "Pricecheck.co.za") {
|
772 |
+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><Offers></Offers>');
|
773 |
+
$xml->asXML($file);
|
774 |
+
} elseif ($feed_config['name'] == "Heureka.cz") {
|
775 |
+
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><SHOP></SHOP>');
|
776 |
+
$xml->addAttribute('xmlns', 'http://www.heureka.cz/ns/offer/1.0');
|
777 |
+
$xml->asXML($file);
|
778 |
} elseif ($feed_config['name'] == "Zap.co.il") {
|
779 |
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><STORE></STORE>');
|
780 |
$xml->addChild('datetime', date('Y-m-d H:i:s'));
|
800 |
$xml->addAttribute('xsi:noNamespaceSchemaLocation', 'http://www.google.com/shopping/reviews/schema/product/2.2/product_reviews.xsd');
|
801 |
$xml->addChild('version', '2.2');
|
802 |
$aggregator = $xml->addChild('aggregator');
|
803 |
+
$aggregator->addChild('name', htmlspecialchars($feed_config['projectname']));
|
804 |
$publisher = $xml->addChild('publisher');
|
805 |
+
$publisher->addChild('name', get_bloginfo( 'name' ));
|
806 |
+
$publisher->addChild('favicon', get_site_icon_url());
|
807 |
$xml->asXML($file);
|
808 |
} else {
|
809 |
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><products></products>');
|
820 |
$aantal = count($products);
|
821 |
|
822 |
if ($aantal > 0){
|
823 |
+
|
824 |
+
if (($feed_config['name'] == "Yandex") AND ($feed_config['nr_products_processed'] == 0)) {
|
825 |
+
$shop = $xml->shop->addChild('offers');
|
826 |
}
|
827 |
|
828 |
// For ZAP template
|
829 |
+
if (($feed_config['name'] == "Zap.co.il") AND ($feed_config['nr_products_processed'] == 0)) {
|
830 |
$productz = $xml->addChild('PRODUCTS');
|
831 |
}
|
832 |
|
833 |
// For Google Product review template
|
834 |
+
if (($feed_config['name'] == "Google Product Review") AND ($feed_config['nr_products_processed'] == 0)) {
|
835 |
+
$product = $xml->addChild('reviews');
|
836 |
+
|
837 |
+
foreach ($products as $key => $value){
|
838 |
+
$expl = "||";
|
839 |
+
if(strpos($value['reviews'], $expl)) {
|
840 |
+
$review_data = explode("||", $value['reviews']);
|
841 |
+
foreach($review_data as $rk => $rv){
|
842 |
+
|
843 |
+
$review_comp = explode(":::", $rv);
|
844 |
+
$nr_reviews = count($review_comp);
|
845 |
+
|
846 |
+
if($nr_reviews > 1){
|
847 |
+
$productz = $xml->reviews->addChild('review');
|
848 |
+
|
849 |
+
foreach($review_comp as $rck => $rcv){
|
850 |
+
$nodes = explode("##", $rcv);
|
851 |
+
$nodes = str_replace("::", "", $nodes);
|
852 |
+
|
853 |
+
if($nodes[0] == "REVIEW_RATINGS"){
|
854 |
+
$rev = $productz->addChild('ratings');
|
855 |
+
$over = $productz->ratings->addChild('overall', $nodes[1]);
|
856 |
+
$over->addAttribute('min', '1');
|
857 |
+
$over->addAttribute('max', '5');
|
858 |
+
} elseif($nodes[0] == "REVIEW_URL"){
|
859 |
+
$rev_url = $productz->addChild(strtolower($nodes[0]), htmlspecialchars($nodes[1]));
|
860 |
+
$rev_url->addAttribute('type', 'singleton');
|
861 |
+
} elseif(($nodes[0] == "REVIEWER_NAME") OR ($nodes[0] == "REVIEWER_ID")){
|
862 |
+
if(isset($productz->reviewer)){
|
863 |
+
if($nodes[0] == "REVIEWER_NAME"){
|
864 |
+
$name = $nodes[1];
|
865 |
+
if(empty($name)){
|
866 |
+
$reviewer->addChild('name','Anonymous');
|
867 |
+
$reviewer->addAttribute('is_anonymous', 'true');
|
868 |
+
} else {
|
869 |
+
$reviewer->addChild('name',$name);
|
870 |
+
}
|
871 |
+
} else {
|
872 |
+
$reviewer->addChild('reviewer_id',$nodes[1]);
|
873 |
+
}
|
874 |
+
} else {
|
875 |
+
$reviewer = $productz->addChild('reviewer');
|
876 |
+
if($nodes[0] == "REVIEWER_NAME"){
|
877 |
+
$name = $nodes[1];
|
878 |
+
if(empty($name)){
|
879 |
+
$reviewer->addChild('name','Anonymous');
|
880 |
+
$reviewer->addAttribute('is_anonymous', 'true');
|
881 |
+
} else {
|
882 |
+
$reviewer->addChild('name',$name);
|
883 |
+
}
|
884 |
+
} else {
|
885 |
+
$reviewer->addChild('reviewer_id',$nodes[1]);
|
886 |
+
}
|
887 |
+
}
|
888 |
+
} else {
|
889 |
+
if(isset($nodes[1])){
|
890 |
+
$content = html_entity_decode($nodes[1]);
|
891 |
+
$content = htmlspecialchars($content);
|
892 |
+
$rev = $productz->addChild(strtolower($nodes[0]), $content);
|
893 |
+
}
|
894 |
+
}
|
895 |
+
|
896 |
+
}
|
897 |
+
|
898 |
+
$yo = $productz->addChild('products');
|
899 |
+
$po = $yo->addChild('product');
|
900 |
+
|
901 |
+
$identifiers = array("brand","gtin","mpn","sku");
|
902 |
|
903 |
+
foreach($value as $k => $v) {
|
904 |
+
|
905 |
+
if(in_array($k, $identifiers)){
|
906 |
+
if(isset($po->product_ids)){
|
907 |
+
if($k == "brand"){
|
908 |
+
$poib = $poi->addChild('brands');
|
909 |
+
$poib->$k = $v;
|
910 |
+
} elseif ($k == "gtin"){
|
911 |
+
$poig = $poi->addChild('gtins');
|
912 |
+
$poig->$k = $v;
|
913 |
+
} elseif ($k == "mpn"){
|
914 |
+
$poim = $poi->addChild('mpns');
|
915 |
+
$poim->$k = $v;
|
916 |
+
} else {
|
917 |
+
$pois = $poi->addChild('skus');
|
918 |
+
$pois->$k = $v;
|
919 |
+
}
|
920 |
+
} else {
|
921 |
+
$poi = $po->addChild('product_ids');
|
922 |
+
if($k == "brand"){
|
923 |
+
$poib = $poi->addChild('brands');
|
924 |
+
$poib->$k = $v;
|
925 |
+
} elseif ($k == "gtin"){
|
926 |
+
$poig = $poi->addChild('gtins');
|
927 |
+
$poig->$k = $v;
|
928 |
+
} elseif ($k == "mpn"){
|
929 |
+
$poim = $poi->addChild('mpns');
|
930 |
+
$poim->$k = $v;
|
931 |
+
} else {
|
932 |
+
$pois = $poi->addChild('skus');
|
933 |
+
$pois->$k = $v;
|
934 |
+
}
|
935 |
+
}
|
936 |
+
} else {
|
937 |
+
if(($k != "reviews") AND ($k != "review_url")){
|
938 |
+
$poa = $po->addChild($k,htmlspecialchars($v));
|
939 |
+
}
|
940 |
+
}
|
941 |
+
}
|
942 |
+
}
|
943 |
+
}
|
944 |
+
}
|
945 |
+
}
|
946 |
+
}
|
947 |
|
948 |
+
foreach ($products as $key => $value){
|
949 |
+
|
950 |
if (is_array ( $value ) ) {
|
951 |
if ($feed_config['name'] == "Yandex") {
|
952 |
+
$product = $xml->shop->offers->addChild('offer');
|
953 |
+
} elseif ($feed_config['name'] == "Heureka.cz" || $feed_config['name'] == "Zbozi.cz" || $feed_config['name'] == "Glami.gr") {
|
954 |
$product = $xml->addChild('SHOPITEM');
|
955 |
} elseif ($feed_config['name'] == "Zap.co.il") {
|
956 |
+
$product = $xml->PRODUCTS->addChild('PRODUCT');
|
957 |
} elseif ($feed_config['name'] == "Salidzini.lv") {
|
958 |
$product = $xml->addChild('item');
|
959 |
} elseif ($feed_config['name'] == "Trovaprezzi.it") {
|
960 |
$product = $xml->addChild('Offer');
|
961 |
+
} elseif ($feed_config['name'] == "Pricecheck.co.za") {
|
962 |
+
$product = $xml->addChild('Offer');
|
963 |
} elseif ($feed_config['name'] == "Google Product Review") {
|
964 |
+
|
965 |
} else {
|
966 |
+
if(count($value) > 0){
|
967 |
+
$product = $xml->addChild('product');
|
968 |
+
}
|
969 |
}
|
970 |
|
971 |
foreach ($value as $k => $v){
|
1067 |
if ($feed_config['fields'] != 'standard'){
|
1068 |
$k = $this->get_alternative_key ($channel_attributes, $k);
|
1069 |
}
|
1070 |
+
if(!empty($k)){
|
1071 |
+
|
1072 |
+
/**
|
1073 |
+
* Some Zbozi and Heureka attributes need some extra XML nodes
|
1074 |
+
*/
|
1075 |
+
$zbozi_nodes = "PARAM_";
|
1076 |
+
|
1077 |
+
if((($feed_config['name'] == "Zbozi.cz") OR ($feed_config['name'] == "Glami.gr") OR ($feed_config['name'] == "Heureka.cz")) AND (preg_match("/$zbozi_nodes/i",$k))){
|
1078 |
+
$pieces = explode ("_", $k);
|
1079 |
+
$productp = $product->addChild('PARAM');
|
1080 |
+
$productp->addChild("PARAM_NAME", $pieces[1]);
|
1081 |
+
$productp->addChild("VAL", $v);
|
1082 |
+
} elseif(($feed_config['name'] == "Yandex") AND (preg_match("/$zbozi_nodes/i",$k))){
|
1083 |
+
$pieces = explode ("_", $k);
|
1084 |
+
$p = "param";
|
1085 |
+
$productp = $product->addChild($p,$v);
|
1086 |
+
$productp->addAttribute('name', $pieces[1]);
|
1087 |
+
} elseif ($feed_config['name'] == "Google Product Review") {
|
1088 |
+
} else {
|
1089 |
+
$product->addChild("$k");
|
1090 |
+
$product->$k = $v;
|
1091 |
+
}
|
1092 |
}
|
1093 |
}
|
1094 |
}
|
1130 |
}
|
1131 |
|
1132 |
// Check if there is a channel feed class that we need to use
|
1133 |
+
if(empty($feed_config['fields'])){
|
1134 |
+
$feed_config['fields'] == "google_shopping";
|
1135 |
+
}
|
1136 |
+
|
1137 |
if ($feed_config['fields'] != 'standard'){
|
1138 |
if (!class_exists('WooSEA_'.$feed_config['fields'])){
|
1139 |
+
require plugin_dir_path(__FILE__) . 'channels/class-'.$feed_config['fields'].'.php';
|
1140 |
$channel_class = "WooSEA_".$feed_config['fields'];
|
1141 |
$channel_attributes = $channel_class::get_channel_attributes();
|
1142 |
update_option ('channel_attributes', $channel_attributes, 'yes');
|
1276 |
$nr_batches = ceil($published_products/750);
|
1277 |
|
1278 |
if($published_products > 50000){
|
1279 |
+
$nr_batches = ceil($published_products/2500);
|
1280 |
} else {
|
1281 |
$nr_batches = ceil($published_products/750);
|
1282 |
}
|
1283 |
}
|
|
|
|
|
|
|
|
|
1284 |
$offset_step_size = ceil($published_products/$nr_batches);
|
1285 |
|
1286 |
/**
|
1352 |
'post_type' => $post_type,
|
1353 |
'post_status' => 'publish',
|
1354 |
'fields' => 'ids',
|
1355 |
+
'no_found_rows' => true,
|
1356 |
);
|
1357 |
$prods = new WP_Query($wp_query);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1358 |
$shipping_zones = $this->woosea_get_shipping_zones();
|
1359 |
|
1360 |
while ($prods->have_posts()) : $prods->the_post();
|
1389 |
$product_data['mother_title'] = $this->woosea_utf8_for_xml( $product_data['mother_title'] );
|
1390 |
$product_data['sku'] = $product->get_sku();
|
1391 |
$product_data['sku_id'] = $product_data['id'];
|
1392 |
+
$product_data['wc_post_id_product_id'] = "wc_post_id_".$product_data['id'];
|
1393 |
$product_data['publication_date'] = get_the_date('d-m-y G:i:s');
|
1394 |
+
$product_data['add_to_cart_link'] = get_site_url()."/shop/?add-to-cart=".$product_data['id'];
|
1395 |
|
1396 |
// Start product visibility logic
|
1397 |
$product_data['exclude_from_catalog'] = "no";
|
1398 |
$product_data['exclude_from_search'] = "no";
|
1399 |
$product_data['exclude_from_all'] = "no";
|
1400 |
+
$product_data['featured'] = "no";
|
1401 |
|
1402 |
$visibility_list = wp_get_post_terms(get_the_ID(), 'product_visibility', array("fields" => "all"));
|
1403 |
+
|
1404 |
foreach($visibility_list as $visibility_single){
|
1405 |
if($visibility_single->slug == "exclude-from-catalog"){
|
1406 |
$product_data['exclude_from_catalog'] = "yes";
|
1407 |
}
|
1408 |
if($visibility_single->slug == "exclude-from-search"){
|
1409 |
$product_data['exclude_from_search'] = "yes";
|
1410 |
+
}
|
1411 |
+
if($visibility_single->slug == "featured"){
|
1412 |
+
$product_data['featured'] = "yes";
|
1413 |
+
}
|
1414 |
}
|
1415 |
|
1416 |
if(($product_data['exclude_from_search'] == "yes") AND ($product_data['exclude_from_catalog'] == "yes")){
|
1430 |
}
|
1431 |
}
|
1432 |
}
|
1433 |
+
|
1434 |
+
//$categories = array_unique(wc_get_product_cat_ids( $product_data['id'] ));
|
1435 |
+
$cat_alt = array();
|
1436 |
+
$cat_term = "";
|
1437 |
+
$categories = array();
|
1438 |
|
1439 |
+
if($product_data['item_group_id'] > 0){
|
1440 |
+
$cat_obj = get_the_terms( $product_data['item_group_id'], 'product_cat' );
|
1441 |
+
} else {
|
1442 |
+
$cat_obj = get_the_terms( $product_data['id'], 'product_cat' );
|
1443 |
+
}
|
1444 |
+
|
1445 |
+
if($cat_obj){
|
1446 |
+
foreach($cat_obj as $cat_term){
|
1447 |
+
$cat_alt[] = $cat_term->term_id;
|
1448 |
+
}
|
1449 |
+
}
|
1450 |
+
$categories = $cat_alt;
|
1451 |
|
1452 |
// This is a category fix for Yandex, probably needed for all channels
|
1453 |
// When Yoast is not installed and a product is linked to multiple categories
|
1482 |
|
1483 |
if(($primary_cat_id) AND ($primary_cat_id > 0)){
|
1484 |
$product_cat = get_term($primary_cat_id, 'product_cat');
|
1485 |
+
$category_path = $this->woosea_get_term_parents( $primary_cat_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
|
1486 |
+
if(!is_object($category_path)){
|
1487 |
+
$product_data['category_path'] = $category_path;
|
1488 |
+
}
|
1489 |
+
|
1490 |
if(isset($product_cat->name)) {
|
1491 |
$catname = $product_cat->name;
|
1492 |
$catlink = get_category_link($product_cat->term_id);
|
1512 |
}
|
1513 |
} else {
|
1514 |
foreach ($categories as $key => $value){
|
1515 |
+
$category_path = $this->woosea_get_term_parents( $value, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
|
1516 |
+
if(!is_object($category_path)){
|
1517 |
+
$product_data['category_path'] = $category_path;
|
1518 |
+
}
|
1519 |
+
|
1520 |
if (!$catname){
|
1521 |
$product_cat = get_term($value, 'product_cat');
|
1522 |
|
1537 |
}
|
1538 |
} else {
|
1539 |
foreach ($categories as $key => $value){
|
1540 |
+
|
1541 |
if (!$catname){
|
1542 |
$product_cat = get_term($value, 'product_cat');
|
1543 |
+
|
1544 |
// Check if there are mother categories
|
1545 |
$parent_categories = get_ancestors($product_cat->term_id, 'product_cat');
|
1546 |
$category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
|
1603 |
$product_data['short_description'] = str_replace(" ", "", $product_data['short_description']);
|
1604 |
|
1605 |
// Strip strange UTF chars
|
1606 |
+
$product_data['description'] = trim($this->woosea_utf8_for_xml($product_data['description']));
|
1607 |
+
$product_data['short_description'] = trim($this->woosea_utf8_for_xml($product_data['short_description']));
|
1608 |
|
1609 |
/**
|
1610 |
* Check of we need to add Google Analytics UTM parameters
|
1621 |
$product_data['condition'] = "New";
|
1622 |
}
|
1623 |
$product_data['availability'] = $this->get_stock( $this->childID );
|
1624 |
+
|
1625 |
/**
|
1626 |
* When 'Enable stock management at product level is active
|
1627 |
* availability will always return out of stock, even when the stock quantity > 0
|
1630 |
$stock_status = $product->get_stock_status();
|
1631 |
if ($stock_status == "outofstock"){
|
1632 |
$product_data['availability'] = "out of stock";
|
1633 |
+
} elseif ($stock_status == "onbackorder") {
|
1634 |
+
$product_data['availability'] = "on backorder";
|
1635 |
} else {
|
1636 |
$product_data['availability'] = "in stock";
|
1637 |
}
|
1679 |
}
|
1680 |
$product_data['rating_total'] = $product->get_rating_count();
|
1681 |
$product_data['rating_average'] = $product->get_average_rating();
|
1682 |
+
|
1683 |
+
// When a product has no reviews than remove the 0 rating
|
1684 |
+
if ($product_data['rating_average'] == 0){
|
1685 |
+
unset($product_data['rating_average']);
|
1686 |
+
}
|
1687 |
+
|
1688 |
$product_data['shipping'] = 0;
|
1689 |
|
1690 |
$tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
|
1694 |
|
1695 |
// Get product prices
|
1696 |
$product_data['price'] = wc_get_price_including_tax($product, array('price'=> $product->get_price()));
|
1697 |
+
|
1698 |
// Override price when WCML price is different than the non-translated price
|
1699 |
if((isset($project_config['WCML'])) AND ($product_data['price'] !== $wcml_price)){
|
1700 |
$product_data['price'] = $wcml_price;
|
1705 |
$product_data['sale_price'] = "";
|
1706 |
}
|
1707 |
|
1708 |
+
// Log some information to the WooCommerce logs
|
1709 |
+
$add_woosea_logging = get_option ('add_woosea_logging');
|
1710 |
+
if($add_woosea_logging == "yes"){
|
1711 |
+
$logger = new WC_Logger();
|
1712 |
+
$logger->add('Product Feed Pro by AdTribes.io','<!-- Start processing new product -->');
|
1713 |
+
$logger->add('Product Feed Pro by AdTribes.io',$product_data['id']);
|
1714 |
+
$logger->add('Product Feed Pro by AdTribes.io',$product_data['title']);
|
1715 |
+
$logger->add('Product Feed Pro by AdTribes.io',$product->get_type());
|
1716 |
+
$logger->add('Product Feed Pro by AdTribes.io','<!-- End processing product -->');
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
// Override price when bundled product
|
1720 |
+
if($product->get_type() == "bundle"){
|
1721 |
+
$meta = get_post_meta($product_data['id']);
|
1722 |
+
$product_data['price'] = get_post_meta($product_data['id'], '_price', true);
|
1723 |
+
$product_data['regular_price'] = get_post_meta($product_data['id'], '_regular_price', true);
|
1724 |
+
if($product_data['price'] != $product_data['regular_price']){
|
1725 |
+
$product_data['sale_price'] = get_post_meta($product_data['id'], '_price', true);
|
1726 |
+
}
|
1727 |
+
}
|
1728 |
+
|
1729 |
if(!empty($tax_rates)){
|
1730 |
foreach ($tax_rates as $tk => $tv){
|
1731 |
if($tv['rate'] > 0){
|
1762 |
if($product_data['sale_price'] > 0){
|
1763 |
$price = $product_data['sale_price'];
|
1764 |
}
|
1765 |
+
|
1766 |
// Do we need to convert all of the above prices with the Aelia Currency Switcher
|
1767 |
if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
|
1768 |
if(!array_key_exists('base_currency', $project_config)){
|
1771 |
$from_currency = $project_config['base_currency'];
|
1772 |
}
|
1773 |
|
1774 |
+
//$product_data['price'] = apply_filters('wc_aelia_cs_convert', $product_data['price'], $from_currency, $project_config['AELIA']);
|
1775 |
+
$product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
|
1776 |
$product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
|
1777 |
$product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price'], $from_currency, $project_config['AELIA']);
|
1778 |
$product_data['price_forced'] = apply_filters('wc_aelia_cs_convert', $product_data['price_forced'], $from_currency, $project_config['AELIA']);
|
1779 |
+
if(isset($product_data['regular_price_forced'])){
|
1780 |
+
$product_data['regular_price_forced'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price_forced'], $from_currency, $project_config['AELIA']);
|
1781 |
+
}
|
1782 |
if($product->get_sale_price()){
|
1783 |
$product_data['sale_price_forced'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price_forced'], $from_currency, $project_config['AELIA']);
|
1784 |
}
|
1785 |
$product_data['net_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_price'], $from_currency, $project_config['AELIA']);
|
1786 |
$product_data['net_regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_regular_price'], $from_currency, $project_config['AELIA']);
|
1787 |
$product_data['net_sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_sale_price'], $from_currency, $project_config['AELIA']);
|
1788 |
+
|
1789 |
// Get Aelia manually inserted currency prices
|
1790 |
if($product->is_type('simple')){
|
1791 |
$regular_aelia_prices = get_post_meta($product_data['id'], '_regular_currency_prices', true);
|
1807 |
}
|
1808 |
}
|
1809 |
|
1810 |
+
// Is the Aelia rounding plugin active
|
1811 |
+
if(class_exists('WC_Aelia_CS_Custom_Rounding')){
|
1812 |
+
$product_data['price'] = round($product_data['price'], 0) - 0.05;
|
1813 |
+
$product_data['regular_price'] = round($product_data['regular_price'], 0) - 0.05;
|
1814 |
+
$product_data['sale_price'] = round($product_data['sale_price'], 0) - 0.05;
|
1815 |
+
$product_data['price_forced'] = round($product_data['price_forced'], 0) - 0.05;
|
1816 |
+
}
|
1817 |
+
|
1818 |
if($product->is_type('simple')){
|
1819 |
$sale_aelia_prices = get_post_meta($product_data['id'], '_sale_currency_prices', true);
|
1820 |
} else {
|
1838 |
}
|
1839 |
|
1840 |
// Localize the price attributes
|
1841 |
+
$decimal_separator = wc_get_price_decimal_separator();
|
1842 |
$product_data['price'] = wc_format_localized_price($product_data['price']);
|
1843 |
$product_data['regular_price'] = wc_format_localized_price($product_data['regular_price']);
|
1844 |
$product_data['sale_price'] = wc_format_localized_price($product_data['sale_price']);
|
1949 |
}
|
1950 |
|
1951 |
/**
|
1952 |
+
* Get Custom Attributes for Single and Bundled products
|
1953 |
*/
|
1954 |
+
if (($product->is_type('simple')) OR ($product->is_type('bundle'))){
|
1955 |
|
1956 |
$custom_attributes = $this->get_custom_attributes( $product_data['id'] );
|
1957 |
|
1968 |
if(($custom_kk == "_woosea_condition") && ($custom_value == "")){
|
1969 |
$custom_value = $product_data['condition'];
|
1970 |
}
|
1971 |
+
|
1972 |
+
// Need to clean up the strange price rightpress is returning
|
1973 |
+
if($custom_kk == "rp_wcdpd_price_cache"){
|
1974 |
+
$aelia_on = get_option('add_aelia_support');
|
1975 |
+
if ($aelia_on == "no"){
|
1976 |
+
$product_data['price'] = $custom_value['price']['p'];
|
1977 |
+
$product_data['sale_price'] = $custom_value['sale_price']['p'];
|
1978 |
+
}
|
1979 |
+
}
|
1980 |
+
|
1981 |
$product_data[$new_key] = $custom_value;
|
1982 |
}
|
1983 |
+
|
1984 |
/**
|
1985 |
* We need to check if this product has individual custom product attributes
|
1986 |
*/
|
2003 |
/**
|
2004 |
* Get Product Attributes for Single products
|
2005 |
*/
|
2006 |
+
if (($product->is_type('simple')) OR ($product->is_type('bundle'))){
|
2007 |
$single_attributes = $product->get_attributes();
|
2008 |
|
2009 |
foreach ($single_attributes as $attribute){
|
2021 |
}
|
2022 |
|
2023 |
// Get product reviews for Google Product Review Feeds
|
2024 |
+
$product_data['reviews'] = $this->woosea_get_reviews( $product_data, $product );
|
2025 |
|
2026 |
/**
|
2027 |
* Versioned products need a seperate approach
|
2028 |
* Get data for these products based on the mother products item group id
|
2029 |
*/
|
2030 |
+
$variation_pass = "true";
|
2031 |
+
if( ($product_data['item_group_id'] > 0) AND (is_object(wc_get_product( $product_data['item_group_id'])))){
|
2032 |
$product_variations = new WC_Product_Variation( $product_data['id'] );
|
2033 |
+
$variations = $product_variations->get_variation_attributes();
|
2034 |
|
2035 |
// Determine the default variation product
|
|
|
2036 |
$mother_product = new WC_Product( $product_data['item_group_id'] );
|
2037 |
$def_attributes = $mother_product->get_default_attributes();
|
2038 |
$diff_result = array_diff($variations, $def_attributes);
|
2039 |
|
2040 |
if(isset($project_config['default_variations']) AND (!empty($diff_result))){
|
2041 |
+
// Only when a variant has no attributes selected we will let it pass
|
2042 |
+
if(count(array_filter($variations)) == 0){
|
2043 |
+
$variation_pass = "true";
|
2044 |
+
} else {
|
2045 |
+
$variation_pass = "false";
|
2046 |
+
}
|
2047 |
}
|
2048 |
|
2049 |
$append = "";
|
2115 |
}
|
2116 |
}
|
2117 |
|
|
|
2118 |
/**
|
2119 |
* Although this is a product variation we also need to grap the Dynamic attributes belonging to the simple mother prodict
|
2120 |
*/
|
2176 |
*/
|
2177 |
$custom_attributes = $this->get_custom_attributes( $product_data['id'] );
|
2178 |
|
2179 |
+
foreach($custom_attributes as $custom_kk => $custom_vv){
|
2180 |
+
$custom_value = get_post_meta( $product_data['id'], $custom_kk, true );
|
|
|
|
|
|
|
|
|
|
|
|
|
2181 |
|
2182 |
+
// Product variant brand is empty, grap that of the mother product
|
2183 |
+
if(($custom_kk == "_woosea_brand") && ($custom_value == "")){
|
2184 |
+
$custom_value = get_post_meta( $product_data['item_group_id'], $custom_kk, true );
|
2185 |
+
}
|
2186 |
|
2187 |
+
// Product variant optimized title is empty, grap the mother product title
|
2188 |
+
if(($custom_kk == "_woosea_optimized_title") && ($custom_value == "")){
|
2189 |
+
$custom_value = $product_data['title'];
|
2190 |
+
}
|
2191 |
|
2192 |
+
if(!is_array($custom_value)){
|
2193 |
+
$new_key ="custom_attributes_" . $custom_kk;
|
2194 |
+
// In order to make the mapping work again, replace var by product
|
2195 |
+
$new_key = str_replace("var","product",$new_key);
|
2196 |
+
if(!empty( $custom_value )){
|
2197 |
+
$product_data[$new_key] = $custom_value;
|
2198 |
+
}
|
2199 |
}
|
2200 |
+
}
|
2201 |
|
2202 |
/**
|
2203 |
* We need to check if this product has individual custom product attributes
|
2242 |
}
|
2243 |
|
2244 |
// Get versioned product categories
|
2245 |
+
//$categories = wc_get_product_cat_ids( $product_data['item_group_id'] );
|
2246 |
+
|
2247 |
+
$cat_alt = array();
|
2248 |
+
$cat_obj = get_the_terms( $product_data['item_group_id'], 'product_cat' );
|
2249 |
+
if($cat_obj){
|
2250 |
+
foreach($cat_obj as $cat_term){
|
2251 |
+
$cat_alt[] = $cat_term->term_id;
|
2252 |
+
}
|
2253 |
+
}
|
2254 |
+
$categories = $cat_alt;
|
2255 |
|
2256 |
// This is a category fix for Yandex, probably needed for all channels
|
2257 |
// When Yoast is not installed and a product is linked to multiple categories
|
2274 |
$categories = $cat_alt;
|
2275 |
}
|
2276 |
|
|
|
|
|
2277 |
// Check if the Yoast plugin is installed and active
|
2278 |
if ( class_exists('WPSEO_Primary_Term') ){
|
2279 |
|
2358 |
$product_data['raw_categories'] = $catname;
|
2359 |
} else {
|
2360 |
foreach ($categories as $key => $value){
|
2361 |
+
if (!$catname){
|
2362 |
$product_cat = get_term($value, 'product_cat');
|
2363 |
+
|
2364 |
if($product_cat->parent > 0){
|
2365 |
$set_parent = $product_cat->parent;
|
2366 |
}
|
2367 |
|
2368 |
+
$category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
|
2369 |
+
if(!is_object($category_path)){
|
2370 |
+
$product_data['category_path'] = $category_path;
|
2371 |
+
}
|
2372 |
+
if(isset($product_cat->name)) {
|
2373 |
+
$catname = $product_cat->name;
|
2374 |
+
$catlink = get_term_link($value,'product_cat');
|
2375 |
+
}
|
|
|
2376 |
} else {
|
2377 |
$product_cat = get_term($value, 'product_cat');
|
2378 |
|
2385 |
$catname_concat = $product_cat->name;
|
2386 |
$catlink_concat = get_term_link($value,'product_cat');
|
2387 |
}
|
2388 |
+
$catname = $catname_concat;
|
2389 |
$catlink .= "||".$catlink_concat;
|
2390 |
}
|
2391 |
}
|
2394 |
$product_data['raw_categories'] = $catname;
|
2395 |
$product_data['category_link'] = $catlink;
|
2396 |
$product_data['categories'] = $catname;
|
2397 |
+
}
|
2398 |
+
// END VARIABLE PRODUCT CODE
|
2399 |
+
|
2400 |
/**
|
2401 |
* In order to prevent XML formatting errors in Google's Merchant center
|
2402 |
* we will add CDATA brackets to the title and description attributes
|
2411 |
$product_data = $this->woosea_exclude_individual( $product_data );
|
2412 |
|
2413 |
/**
|
2414 |
+
* Field manipulation
|
2415 |
*/
|
2416 |
+
if (array_key_exists('field_manipulation', $project_config)){
|
2417 |
if(is_array($product_data)){
|
2418 |
+
$product_data = $this->woocommerce_field_manipulation( $project_config['field_manipulation'], $product_data );
|
2419 |
}
|
2420 |
+
}
|
2421 |
|
2422 |
/**
|
2423 |
* Filter execution
|
2441 |
}
|
2442 |
}
|
2443 |
|
2444 |
+
/**
|
2445 |
+
* Rules execution
|
2446 |
+
*/
|
2447 |
+
if (array_key_exists('rules2', $project_config)){
|
2448 |
+
if(is_array($product_data)){
|
2449 |
+
$product_data = $this->woocommerce_sea_rules( $project_config['rules2'], $product_data );
|
2450 |
+
}
|
2451 |
+
}
|
2452 |
+
|
2453 |
/**
|
2454 |
* When a product is a variable product we need to delete the original product from the feed, only the originals are allowed
|
2455 |
*/
|
2506 |
}
|
2507 |
} else {
|
2508 |
if((strlen($attr_value['mapfrom'])) AND (array_key_exists($attr_value['mapfrom'], $product_data))){
|
2509 |
+
if(($attr_value['attribute'] == "g:link") OR ($attr_value['attribute'] == "g:image_link") OR ($attr_value['attribute'] == "link") OR ($attr_value['attribute'] == "Final URL") OR ($attr_value['attribute'] == "SKU")){
|
2510 |
+
$attr_line = "'".$attr_value['prefix']."".$product_data[$attr_value['mapfrom']]."".$attr_value['suffix']."'";
|
2511 |
+
} else {
|
2512 |
+
$attr_line = "'".$attr_value['prefix']. "".$product_data[$attr_value['mapfrom']]."" .$attr_value['suffix']."'";
|
2513 |
+
}
|
2514 |
} else {
|
2515 |
$attr_line = "''";
|
2516 |
}
|
2540 |
$product_tag_str = ltrim($product_tag_str, ",");
|
2541 |
|
2542 |
$attr_line .= ",'".$product_tag_str."'";
|
2543 |
+
} elseif ($attr_value['mapfrom'] == "reviews"){
|
2544 |
+
$review_str = "";
|
2545 |
+
foreach ($product_data[$attr_value['mapfrom']] as $key => $value){
|
2546 |
+
$review_str .= "||";
|
2547 |
+
foreach($value as $k => $v){
|
2548 |
+
$review_str .= ":$v";
|
2549 |
+
}
|
2550 |
+
}
|
2551 |
+
$review_str = ltrim($review_str, "||");
|
2552 |
+
$review_str = rtrim($review_str, ":");
|
2553 |
+
$review_str = ltrim($review_str, ":");
|
2554 |
+
$review_str = str_replace("||:", "||", $review_str);
|
2555 |
+
$review_str .= "||";
|
2556 |
+
$attr_line .= ",'".$review_str."'";
|
2557 |
} else {
|
2558 |
$shipping_str = "";
|
2559 |
foreach ($product_data[$attr_value['mapfrom']] as $key => $value){
|
2576 |
}
|
2577 |
} else {
|
2578 |
if(strlen($product_data[$attr_value['mapfrom']])){
|
2579 |
+
if(($attr_value['attribute'] == "g:link") OR ($attr_value['attribute'] == "g:image_link") OR ($attr_value['attribute'] == "link") OR ($attr_value['attribute'] == "Final URL") OR ($attr_value['attribute'] == "SKU")){
|
2580 |
+
$attr_line .= ",'".$attr_value['prefix']."".$product_data[$attr_value['mapfrom']]."".$attr_value['suffix']."'";
|
2581 |
+
} else {
|
2582 |
+
$attr_line .= ",'".$attr_value['prefix']. " ".$product_data[$attr_value['mapfrom']]." " .$attr_value['suffix']."'";
|
2583 |
+
}
|
2584 |
} else {
|
2585 |
$attr_line .= ",''";
|
2586 |
}
|
2669 |
if(key_exists($attr_value['mapfrom'],$product_data)){
|
2670 |
|
2671 |
if(is_array($product_data[$attr_value['mapfrom']])){
|
2672 |
+
|
2673 |
if($attr_value['mapfrom'] == "product_tag"){
|
2674 |
$product_tag_str = "";
|
2675 |
|
2680 |
$product_tag_str = ltrim($product_tag_str, ",");
|
2681 |
$product_tag_str = rtrim($product_tag_str, ",");
|
2682 |
|
2683 |
+
$xml_product[$attr_value['attribute']] = "$product_tag_str";
|
2684 |
+
|
2685 |
+
} elseif($attr_value['mapfrom'] == "reviews"){
|
2686 |
+
$review_str = "";
|
2687 |
+
|
2688 |
+
foreach ($product_data[$attr_value['mapfrom']] as $key => $value){
|
2689 |
+
$review_str .= "||";
|
2690 |
+
|
2691 |
+
foreach($value as $k => $v){
|
2692 |
+
if($k == "review_product_id"){
|
2693 |
+
$review_str .= ":::REVIEW_PRODUCT_ID##$v";
|
2694 |
+
} elseif ($k == "reviewer_image"){
|
2695 |
+
$review_str .= ":::REVIEWER_IMAGE##$v";
|
2696 |
+
} elseif ($k == "review_ratings"){
|
2697 |
+
$review_str .= ":::REVIEW_RATINGS##$v";
|
2698 |
+
} elseif ($k == "review_id"){
|
2699 |
+
$review_str .= ":::REVIEW_ID##$v";
|
2700 |
+
} elseif ($k == "reviewer_name"){
|
2701 |
+
$review_str .= ":::REVIEWER_NAME##$v";
|
2702 |
+
} elseif ($k == "reviewer_id"){
|
2703 |
+
$review_str .= ":::REVIEWER_ID##$v";
|
2704 |
+
} elseif ($k == "review_timestamp"){
|
2705 |
+
$v = str_replace(" ", "T", $v);
|
2706 |
+
$v .= "Z";
|
2707 |
+
$review_str .= ":::REVIEW_TIMESTAMP##$v";
|
2708 |
+
} elseif ($k == "review_url"){
|
2709 |
+
$review_str .= ":::REVIEW_URL##$v";
|
2710 |
+
} elseif ($k == "title"){
|
2711 |
+
$review_str .= ":::TITLE##$v";
|
2712 |
+
} elseif ($k == "content"){
|
2713 |
+
$review_str .= ":::CONTENT##$v";
|
2714 |
+
} elseif ($k == "pros"){
|
2715 |
+
$review_str .= ":::PROS##$v";
|
2716 |
+
} elseif ($k == "cons"){
|
2717 |
+
$review_str .= ":::CONS##$v";
|
2718 |
+
} else {
|
2719 |
+
// UNKNOWN, DO NOT ADD
|
2720 |
+
}
|
2721 |
+
}
|
2722 |
+
}
|
2723 |
+
$review_str = ltrim($review_str, "||");
|
2724 |
+
$review_str = rtrim($review_str, ":");
|
2725 |
+
$review_str = ltrim($review_str, ":");
|
2726 |
+
$review_str = str_replace("||:", "||", $review_str);
|
2727 |
+
|
2728 |
+
$review_str .= "||";
|
2729 |
+
|
2730 |
+
$xml_product[$attr_value['attribute']] = "$review_str";
|
2731 |
} else {
|
2732 |
$shipping_str = "";
|
2733 |
foreach ($product_data[$attr_value['mapfrom']] as $key => $value){
|
2735 |
|
2736 |
foreach($value as $k => $v){
|
2737 |
|
2738 |
+
if($k == "country"){
|
2739 |
+
$shipping_str .= ":WOOSEA_COUNTRY##$v";
|
2740 |
+
} elseif ($k == "region"){
|
2741 |
+
$shipping_str .= ":WOOSEA_REGION##$v";
|
2742 |
+
} elseif ($k == "service"){
|
2743 |
+
$shipping_str .= ":WOOSEA_SERVICE##$v";
|
2744 |
+
} elseif ($k == "postal_code"){
|
2745 |
+
$shipping_str .= ":WOOSEA_POSTAL_CODE##$v";
|
2746 |
+
} elseif ($k == "price"){
|
2747 |
+
$shipping_str .= ":WOOSEA_PRICE##$attr_value[prefix] $v $attr_value[suffix]";
|
2748 |
+
} else {
|
2749 |
+
// UNKNOWN, DO NOT ADD
|
2750 |
+
}
|
2751 |
}
|
2752 |
+
}
|
2753 |
+
$shipping_str = ltrim($shipping_str, "||");
|
2754 |
+
$shipping_str = rtrim($shipping_str, ":");
|
2755 |
+
$shipping_str = ltrim($shipping_str, ":");
|
2756 |
+
$shipping_str = str_replace("||:", "||", $shipping_str);
|
|
|
2757 |
|
2758 |
+
$xml_product[$attr_value['attribute']] = "$shipping_str";
|
2759 |
}
|
2760 |
} else {
|
2761 |
if(array_key_exists($attr_value['attribute'], $xml_product)){
|
2766 |
|
2767 |
if(($attr_value['attribute'] == "g:link") OR ($attr_value['attribute'] == "link")){
|
2768 |
$xml_product[$attr_value['attribute']] = "$attr_value[prefix] ". $product_data[$attr_value['mapfrom']] ."$attr_value[suffix]";
|
2769 |
+
} elseif(($attr_value['attribute'] == "g:image_link") OR ($attr_value['attribute'] == "image_link")){
|
2770 |
+
$xml_product[$attr_value['attribute']] = "$attr_value[prefix]".$product_data[$attr_value['mapfrom']]."$attr_value[suffix]";
|
2771 |
} elseif(($attr_value['attribute'] == "g:id") OR ($attr_value['attribute'] == "id") OR ($attr_value['attribute'] == "g:item_group_id")){
|
2772 |
$xml_product[$attr_value['attribute']] = "$attr_value[prefix]". $product_data[$attr_value['mapfrom']] ."$attr_value[suffix]";
|
2773 |
} else {
|
2915 |
|
2916 |
if (!copy($tmp_file, $new_file)) {
|
2917 |
error_log("Copy of file failed");
|
2918 |
+
} else {
|
2919 |
+
unlink($tmp_file);
|
2920 |
}
|
2921 |
// END
|
2922 |
|
2949 |
|
2950 |
if (!copy($tmp_file, $new_file)) {
|
2951 |
error_log("Copy of file failed - small file");
|
2952 |
+
} else {
|
2953 |
+
unlink($tmp_file);
|
2954 |
}
|
2955 |
// END
|
2956 |
|
3118 |
// Strip slashes
|
3119 |
$pm_array['criteria'] = str_replace("\\","",$pm_array['criteria']);
|
3120 |
$pm_array['criteria'] = str_replace("/","",$pm_array['criteria']);
|
3121 |
+
$pm_array['criteria'] = trim($pm_array['criteria']);
|
3122 |
$original_cat = str_replace("\\","",$original_cat);
|
3123 |
$original_cat = str_replace("/","",$original_cat);
|
3124 |
+
$original_cat = trim($original_cat);
|
3125 |
|
3126 |
// First check if there is a category mapping for this specific product
|
3127 |
+
|
3128 |
+
//if(($pm_array['criteria'] == "$original_cat") AND (!empty($pm_array['map_to_category']))){
|
3129 |
+
// $category_pieces = explode("-", $pm_array['map_to_category']);
|
3130 |
+
// $tmp_cat = $category_pieces[0];
|
3131 |
+
// $match = "true";
|
3132 |
+
//}
|
3133 |
+
|
3134 |
+
if ((preg_match('/'.$pm_array['criteria'].'/', $original_cat))){
|
3135 |
$category_pieces = explode("-", $pm_array['map_to_category']);
|
3136 |
$tmp_cat = $category_pieces[0];
|
3137 |
$match = "true";
|
3138 |
+
} elseif($pm_array['criteria'] == $original_cat){
|
3139 |
+
$category_pieces = explode("-", $pm_array['map_to_category']);
|
3140 |
+
$tmp_cat = $category_pieces[0];
|
3141 |
+
$match = "true";
|
3142 |
+
} else {
|
3143 |
+
// Do nothing
|
3144 |
}
|
3145 |
}
|
3146 |
|
3156 |
return $product_data;
|
3157 |
}
|
3158 |
|
3159 |
+
/**
|
3160 |
+
* Execute field manipulations
|
3161 |
+
*/
|
3162 |
+
private function woocommerce_field_manipulation( $field_manipulation, $product_data ){
|
3163 |
+
$aantal_prods = count($product_data);
|
3164 |
+
$product_type_data = $product_data['product_type'];
|
3165 |
+
|
3166 |
+
if($aantal_prods > 0){
|
3167 |
+
foreach ($field_manipulation as $manipulation_key => $manipulation_array){
|
3168 |
+
foreach ($manipulation_array as $ma_k => $ma_v){
|
3169 |
+
if($ma_k == "attribute"){
|
3170 |
+
$alter_field = $ma_v;
|
3171 |
+
} elseif ($ma_k == "rowCount"){
|
3172 |
+
$rowCount = $ma_v;
|
3173 |
+
} elseif ($ma_k == "product_type"){
|
3174 |
+
$product_type = $ma_v;
|
3175 |
+
} else {
|
3176 |
+
$becomes = $ma_v;
|
3177 |
+
$value = "";
|
3178 |
+
|
3179 |
+
if($product_type == "variable"){
|
3180 |
+
$product_type = "variation";
|
3181 |
+
}
|
3182 |
+
|
3183 |
+
// Field manipulation only for the product_types that were determined
|
3184 |
+
if(($product_type == $product_type_data) OR ($product_type == "all")){
|
3185 |
+
foreach ($becomes as $bk => $bv){
|
3186 |
+
|
3187 |
+
foreach ($bv as $bkk => $bvv){
|
3188 |
+
if($bkk == "attribute"){
|
3189 |
+
if(isset($product_data[$bvv])){
|
3190 |
+
$value .= $product_data[$bvv]." ";
|
3191 |
+
}
|
3192 |
+
}
|
3193 |
+
}
|
3194 |
+
}
|
3195 |
+
$product_data[$alter_field] = $value;
|
3196 |
+
}
|
3197 |
+
}
|
3198 |
+
}
|
3199 |
+
}
|
3200 |
+
}
|
3201 |
+
return $product_data;
|
3202 |
+
}
|
3203 |
+
|
3204 |
/**
|
3205 |
* Execute project rules
|
3206 |
*/
|
3220 |
$pr_array['than_attribute'] = $pd_key;
|
3221 |
}
|
3222 |
|
3223 |
+
// Check if a rule has been set for Google categories
|
3224 |
+
if (!empty($product_data['categories']) AND ($pr_array['than_attribute'] == "google_category") AND ($product_data[$pr_array['attribute']] == $pr_array['criteria'])){
|
3225 |
+
|
3226 |
$pr_array['than_attribute'] = "categories";
|
3227 |
+
$category_id = explode("-", $pr_array['newvalue']);
|
3228 |
+
$pr_array['newvalue'] = $category_id[0];
|
3229 |
+
$product_data['categories'] = $pr_array['newvalue'];
|
3230 |
}
|
3231 |
|
3232 |
// Make sure that rules on numerics are on true numerics
|
3234 |
$pd_value = strtr($pd_value, ',', '.');
|
3235 |
}
|
3236 |
|
|
|
3237 |
if (((is_numeric($pd_value)) AND ($pr_array['than_attribute'] != "shipping"))){
|
3238 |
|
3239 |
// Rules for numeric values
|
3240 |
switch ($pr_array['condition']) {
|
3241 |
case($pr_array['condition'] = "contains"):
|
3242 |
if ((preg_match('/'.$pr_array['criteria'].'/', $pd_value))){
|
|
|
3243 |
$product_data[$pr_array['than_attribute']] = str_replace($pr_array['criteria'], $pr_array['newvalue'], $pd_value);
|
3244 |
}
|
3245 |
break;
|
3403 |
case($pr_array['condition'] = "contains"):
|
3404 |
if ((preg_match('/'.$pr_array['criteria'].'/', $pd_value))){
|
3405 |
// Specifically for shipping price rules
|
3406 |
+
if(!empty($product_data[$pr_array['than_attribute']])){
|
3407 |
+
if(is_array($product_data[$pr_array['than_attribute']])){
|
3408 |
+
$arr_size = (count($product_data[$pr_array['than_attribute']])-1);
|
3409 |
+
for ($x = 0; $x <= $arr_size; $x++) {
|
3410 |
+
$product_data[$pr_array['than_attribute']][$x]['price'] = $pr_array['newvalue'];
|
3411 |
+
}
|
3412 |
+
} else {
|
3413 |
+
$product_data[$pr_array['than_attribute']] = $pr_array['newvalue'];
|
3414 |
+
}
|
3415 |
} else {
|
3416 |
+
// This attribute value is empty for this product
|
3417 |
$product_data[$pr_array['than_attribute']] = $pr_array['newvalue'];
|
3418 |
}
|
3419 |
}
|
3517 |
|
3518 |
case($pr_array['condition'] = "empty"):
|
3519 |
if(empty($product_data[$pr_array['attribute']])){
|
3520 |
+
if(empty($product_data[$pr_array['than_attribute']])){
|
3521 |
+
$product_data[$pr_array['than_attribute']] = $pr_array['newvalue'];
|
3522 |
+
} else {
|
3523 |
+
$product_data[$pr_array['attribute']] = $product_data[$pr_array['than_attribute']];
|
3524 |
+
}
|
3525 |
}
|
3526 |
break;
|
3527 |
case($pr_array['condition'] = "replace"):
|
3588 |
|
3589 |
if(in_array($pd_key, $pr_array, TRUE)){
|
3590 |
|
|
|
|
|
|
|
|
|
3591 |
if (is_numeric($pd_value)){
|
3592 |
+
|
3593 |
+
$old_value = $pd_value;
|
3594 |
+
if($pd_key == "price"){
|
3595 |
+
$pd_value = @number_format($pd_value,2);
|
3596 |
+
}
|
3597 |
+
|
3598 |
// Rules for numeric values
|
3599 |
switch ($pr_array['condition']) {
|
3600 |
case($pr_array['condition'] = "contains"):
|
3612 |
}
|
3613 |
break;
|
3614 |
case($pr_array['condition'] = "="):
|
3615 |
+
if (($old_value == $pr_array['criteria']) && ($pr_array['than'] == "exclude")){
|
3616 |
$allowed = 0;
|
3617 |
+
} elseif (($old_value != $pr_array['criteria']) && ($pr_array['than'] == "include_only")){
|
3618 |
$allowed = 0;
|
3619 |
}
|
3620 |
break;
|
3621 |
case($pr_array['condition'] = "!="):
|
3622 |
+
if (($old_value == $pr_array['criteria']) && ($pr_array['than'] == "exclude")){
|
3623 |
$allowed = 1;
|
3624 |
+
} elseif (($old_value == $pr_array['criteria']) && ($pr_array['than'] == "include_only")){
|
3625 |
$allowed = 0;
|
3626 |
}
|
3627 |
break;
|
3628 |
case($pr_array['condition'] = ">"):
|
3629 |
+
if (($old_value > $pr_array['criteria']) && ($pr_array['than'] == "exclude")){
|
3630 |
$allowed = 0;
|
3631 |
+
} elseif (($old_value <= $pr_array['criteria']) && ($pr_array['than'] == "include_only")){
|
3632 |
$allowed = 0;
|
3633 |
}
|
3634 |
break;
|
3635 |
case($pr_array['condition'] = ">="):
|
3636 |
+
if (($old_value >= $pr_array['criteria']) && ($pr_array['than'] == "exclude")){
|
3637 |
$allowed = 0;
|
3638 |
+
} elseif (($old_value < $pr_array['criteria']) && ($pr_array['than'] == "include_only")){
|
3639 |
$allowed = 0;
|
3640 |
}
|
3641 |
break;
|
3642 |
case($pr_array['condition'] = "<"):
|
3643 |
+
if (($old_value < $pr_array['criteria']) && ($pr_array['than'] == "exclude")){
|
3644 |
$allowed = 0;
|
3645 |
+
} elseif (($old_value > $pr_array['criteria']) && ($pr_array['than'] == "include_only")){
|
3646 |
$allowed = 0;
|
3647 |
}
|
3648 |
break;
|
3649 |
case($pr_array['condition'] = "=<"):
|
3650 |
+
if (($old_value <= $pr_array['criteria']) && ($pr_array['than'] == "exclude")){
|
3651 |
$allowed = 0;
|
3652 |
+
} elseif (($old_value > $pr_array['criteria']) && ($pr_array['than'] == "include_only")){
|
3653 |
$allowed = 0;
|
3654 |
}
|
3655 |
case($pr_array['condition'] = "empty"):
|
3767 |
if($pr_array['than'] == "include_only"){
|
3768 |
$allowed = 0;
|
3769 |
} else {
|
3770 |
+
$allowed = 1;
|
3771 |
}
|
3772 |
break;
|
3773 |
case($pr_array['condition'] = "containsnot"):
|
3781 |
if($pr_array['than'] == "include_only"){
|
3782 |
$allowed = 0;
|
3783 |
} else {
|
3784 |
+
$allowed = 1;
|
3785 |
}
|
3786 |
break;
|
3787 |
case($pr_array['condition'] = "!="):
|
classes/class-update-channel.php
CHANGED
@@ -202,6 +202,15 @@ class WooSEA_Update_Project {
|
|
202 |
unset($project_config['rules2']);
|
203 |
}
|
204 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
|
206 |
/**
|
207 |
* Update cron with new project settings
|
202 |
unset($project_config['rules2']);
|
203 |
}
|
204 |
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Did all the field manipulations got removed
|
208 |
+
*/
|
209 |
+
if((array_key_exists('woosea_page', $project_data)) AND ($project_data['woosea_page'] == "field_manipulation")){
|
210 |
+
if(!array_key_exists('field_manipulation', $project_data)) {
|
211 |
+
unset($project_config['field_manipulation']);
|
212 |
+
}
|
213 |
+
}
|
214 |
|
215 |
/**
|
216 |
* Update cron with new project settings
|
js/woosea_autocomplete.js
CHANGED
@@ -5433,7 +5433,7 @@ jQuery(document).ready(function($) {
|
|
5433 |
|
5434 |
jQuery(".dashicons-arrow-down").click(function(){
|
5435 |
var className = $(this).attr("class").split(' ')[2];
|
5436 |
-
var rowCount = className.split("_")[2]
|
5437 |
var map_to_category = $(".autocomplete_" + rowCount).val();
|
5438 |
var project_hash = $("#project_hash").val();
|
5439 |
var minimum = 1;
|
@@ -5541,7 +5541,7 @@ jQuery(document).ready(function($) {
|
|
5541 |
jQuery(".js-autosuggest").click(function(){
|
5542 |
var className = $(this).attr("class").split(' ')[3];
|
5543 |
var rowCount = className.split("_")[1]
|
5544 |
-
|
5545 |
jQuery( ".autocomplete_" + rowCount ).typeahead({
|
5546 |
input: '.js-autosuggest',
|
5547 |
source: google_taxonomy,
|
@@ -5556,6 +5556,7 @@ jQuery(document).ready(function($) {
|
|
5556 |
|
5557 |
|
5558 |
jQuery(this).on('change', function(){ // on change of state
|
|
|
5559 |
var minimum = 1;
|
5560 |
var len = jQuery(this).val().length;
|
5561 |
var project_hash = $("#project_hash").val();
|
@@ -5563,7 +5564,7 @@ jQuery(document).ready(function($) {
|
|
5563 |
var map_to_category = jQuery(this).val();
|
5564 |
|
5565 |
jQuery(".autocomplete_" + rowCount).addClass("input-field-large-active");
|
5566 |
-
|
5567 |
if (len >= minimum){
|
5568 |
if ( !isNaN(parseInt(map_to_category)) ) {
|
5569 |
|
5433 |
|
5434 |
jQuery(".dashicons-arrow-down").click(function(){
|
5435 |
var className = $(this).attr("class").split(' ')[2];
|
5436 |
+
var rowCount = className.split("_")[2];
|
5437 |
var map_to_category = $(".autocomplete_" + rowCount).val();
|
5438 |
var project_hash = $("#project_hash").val();
|
5439 |
var minimum = 1;
|
5541 |
jQuery(".js-autosuggest").click(function(){
|
5542 |
var className = $(this).attr("class").split(' ')[3];
|
5543 |
var rowCount = className.split("_")[1]
|
5544 |
+
|
5545 |
jQuery( ".autocomplete_" + rowCount ).typeahead({
|
5546 |
input: '.js-autosuggest',
|
5547 |
source: google_taxonomy,
|
5556 |
|
5557 |
|
5558 |
jQuery(this).on('change', function(){ // on change of state
|
5559 |
+
|
5560 |
var minimum = 1;
|
5561 |
var len = jQuery(this).val().length;
|
5562 |
var project_hash = $("#project_hash").val();
|
5564 |
var map_to_category = jQuery(this).val();
|
5565 |
|
5566 |
jQuery(".autocomplete_" + rowCount).addClass("input-field-large-active");
|
5567 |
+
|
5568 |
if (len >= minimum){
|
5569 |
if ( !isNaN(parseInt(map_to_category)) ) {
|
5570 |
|
js/woosea_field_mapping.js
CHANGED
@@ -112,7 +112,11 @@ jQuery(document).ready(function($) {
|
|
112 |
|
113 |
$("#own-input-field").each(function() {
|
114 |
var input=$(this).val();
|
115 |
-
var re = /^[a-zA-
|
|
|
|
|
|
|
|
|
116 |
var minLength = 2;
|
117 |
var maxLength = 50;
|
118 |
|
112 |
|
113 |
$("#own-input-field").each(function() {
|
114 |
var input=$(this).val();
|
115 |
+
var re = /^[a-zA-Zа-яА-Я_-]*$/;
|
116 |
+
if (input.indexOf("PARAM_") >= 0){
|
117 |
+
// For Yandex, Zbozi and Heureka also accept Cyrillic characters
|
118 |
+
var re = /^[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяЯ \_\-\,]+$/;
|
119 |
+
}
|
120 |
var minLength = 2;
|
121 |
var maxLength = 50;
|
122 |
|
js/woosea_key.js
CHANGED
@@ -27,7 +27,7 @@ jQuery(document).ready(function($) {
|
|
27 |
var license_key = $('#license-key').val();
|
28 |
|
29 |
jQuery.ajax({
|
30 |
-
url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=
|
31 |
jsonp: 'callback',
|
32 |
dataType: 'jsonp',
|
33 |
type: 'GET',
|
@@ -62,6 +62,4 @@ jQuery(document).ready(function($) {
|
|
62 |
}
|
63 |
})
|
64 |
});
|
65 |
-
|
66 |
-
// On succes this call will return yes/no in jsonp for the domain name check. It will also return the license key. This key needs to correlate with the one user entered.
|
67 |
});
|
27 |
var license_key = $('#license-key').val();
|
28 |
|
29 |
jQuery.ajax({
|
30 |
+
url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=6.0.0',
|
31 |
jsonp: 'callback',
|
32 |
dataType: 'jsonp',
|
33 |
type: 'GET',
|
62 |
}
|
63 |
})
|
64 |
});
|
|
|
|
|
65 |
});
|
js/woosea_manage.js
CHANGED
@@ -81,7 +81,25 @@ jQuery(document).ready(function($) {
|
|
81 |
}
|
82 |
});
|
83 |
|
|
|
|
|
|
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
// Check if user would like to enable WPML support
|
87 |
$('#add_wpml_support').on('change', function(){ // on change of state
|
@@ -143,6 +161,26 @@ jQuery(document).ready(function($) {
|
|
143 |
}
|
144 |
})
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
// Check if user would like to enable Dynamic Remarketing
|
147 |
$('#add_remarketing').on('change', function(){ // on change of state
|
148 |
if(this.checked){
|
81 |
}
|
82 |
});
|
83 |
|
84 |
+
// Check if user would like to enable product data manipulation support
|
85 |
+
$('#add_manipulation_support').on('change', function(){ // on change of state
|
86 |
+
if(this.checked){
|
87 |
|
88 |
+
// Checkbox is on
|
89 |
+
jQuery.ajax({
|
90 |
+
method: "POST",
|
91 |
+
url: ajaxurl,
|
92 |
+
data: { 'action': 'woosea_add_manipulation', 'status': "on" }
|
93 |
+
})
|
94 |
+
} else {
|
95 |
+
// Checkbox is off
|
96 |
+
jQuery.ajax({
|
97 |
+
method: "POST",
|
98 |
+
url: ajaxurl,
|
99 |
+
data: { 'action': 'woosea_add_manipulation', 'status': "off" }
|
100 |
+
})
|
101 |
+
}
|
102 |
+
})
|
103 |
|
104 |
// Check if user would like to enable WPML support
|
105 |
$('#add_wpml_support').on('change', function(){ // on change of state
|
161 |
}
|
162 |
})
|
163 |
|
164 |
+
// Check if user would like to enable debug logging
|
165 |
+
$('#add_woosea_logging').on('change', function(){ // on change of state
|
166 |
+
if(this.checked){
|
167 |
+
|
168 |
+
// Checkbox is on
|
169 |
+
jQuery.ajax({
|
170 |
+
method: "POST",
|
171 |
+
url: ajaxurl,
|
172 |
+
data: { 'action': 'woosea_add_woosea_logging', 'status': "on" }
|
173 |
+
})
|
174 |
+
} else {
|
175 |
+
// Checkbox is off
|
176 |
+
jQuery.ajax({
|
177 |
+
method: "POST",
|
178 |
+
url: ajaxurl,
|
179 |
+
data: { 'action': 'woosea_add_woosea_logging', 'status': "off" }
|
180 |
+
})
|
181 |
+
}
|
182 |
+
})
|
183 |
+
|
184 |
// Check if user would like to enable Dynamic Remarketing
|
185 |
$('#add_remarketing').on('change', function(){ // on change of state
|
186 |
if(this.checked){
|
js/woosea_rules.js
CHANGED
@@ -1,5 +1,60 @@
|
|
1 |
jQuery(document).ready(function($) {
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
// Add standard filters
|
4 |
jQuery(".add-filter").click(function(){
|
5 |
// Count amount of rows, used to create the form array field and values
|
@@ -57,9 +112,9 @@ jQuery(document).ready(function($) {
|
|
57 |
data = JSON.parse( data );
|
58 |
|
59 |
if(TrueRowCount == 0){
|
60 |
-
$( '#woosea-ajax-table' ).find('tbody:first').append('<tr><td><input type="hidden" name="rules2[' + data.rowCount + '][rowCount]" value="' + data.rowCount + '"><input type="checkbox" name="record" class="checkbox-field"></td><td><i>Rule:</i></td><td><select name="rules2[' + data.rowCount + '][attribute]" class="select-field">' + data.dropdown + '</select></td><td><select name="rules2[' + data.rowCount + '][condition]" class="select-field" id="condition_' + data.rowCount + '""><option value="contains">contains</option><option value="containsnot">does not contain</option><option value="=">is equal to</option><option value="!=">is not equal to</option><option value=">">is greater than</option><option value=">=">is greater or equal to</option><option value="<">is less than</option><option value="=<">is less or equal to</option><option value="empty">is empty</option><option value="multiply">multiply</option><option value="divide">divide</option><option value="plus">plus</option><option value="minus">minus</option
|
61 |
} else {
|
62 |
-
$('<tr><td><input type="hidden" name="rules2[' + data.rowCount + '][rowCount]" value="' + data.rowCount + '"><input type="checkbox" name="record" class="checkbox-field"></td><td><i>Rule:</i></td><td><select name="rules2[' + data.rowCount + '][attribute]" class="select-field">' + data.dropdown + '</select></td><td><select name="rules2[' + data.rowCount + '][condition]" class="select-field" id="condition_' + data.rowCount + '""><option value="contains">contains</option><option value="containsnot">does not contain</option><option value="=">is equal to</option><option value="!=">is not equal to</option><option value=">">is greater than</option><option value=">=">is greater or equal to</option><option value="<">is less than</option><option value="=<">is less or equal to</option><option value="empty">is empty</option><option value="multiply">multiply</option><option value="divide">divide</option><option value="plus">plus</option><option value="minus">minus</option
|
63 |
}
|
64 |
|
65 |
// Check if user selected a data manipulation condition
|
1 |
jQuery(document).ready(function($) {
|
2 |
|
3 |
+
// Add standard filters
|
4 |
+
jQuery(".add-field-manipulation").click(function(){
|
5 |
+
var TrueRowCount = $('#woosea-ajax-table >tbody >tr').length-1;
|
6 |
+
var rowCount = Math.round(new Date().getTime() + (Math.random() * 100));
|
7 |
+
var plusCount = Math.round(new Date().getTime() + (Math.random() * 100));
|
8 |
+
|
9 |
+
jQuery.ajax({
|
10 |
+
method: "POST",
|
11 |
+
url: ajaxurl,
|
12 |
+
data: { 'action': 'woosea_ajax', 'rowCount': rowCount }
|
13 |
+
})
|
14 |
+
|
15 |
+
.done(function( data ) {
|
16 |
+
data = JSON.parse( data );
|
17 |
+
|
18 |
+
if(TrueRowCount == 0){
|
19 |
+
$( '#woosea-ajax-table' ).find('tbody:first').append('<tr><td valign="top"><input type="hidden" name="field_manipulation[' + data.rowCount + '][rowCount]" value="' + data.rowCount + '"><input type="checkbox" name="record" class="checkbox-field"></td><td valign="top"><select name="field_manipulation[' + data.rowCount + '][product_type]" class="select-field"><option value="all">Simple and variable</option><option value="simple">Simple</option><option value="variable">Variable</option></select></td></td><td valign="top"><select name="field_manipulation[' + data.rowCount + '][attribute]" id="field_manipulation_' + data.rowCount + '">' + data.dropdown + '</select></td><td class="becomes_fields_' + data.rowCount + '" valign="top"><select name="field_manipulation[' + data.rowCount + '][becomes][1][attribute]" id="field_manipulation_becomes_attribute_' + data.rowCount + '">' + data.dropdown + '</select></td><td><span class="dashicons dashicons-plus field_extra field_manipulation_extra_' + data.rowCount + '" style="display: inline-block;" title="Add an attribute to this field"></span></td></tr>');
|
20 |
+
} else {
|
21 |
+
|
22 |
+
$('<tr><td valign="top"><input type="hidden" name="field_manipulation[' + data.rowCount + '][rowCount]" value="' + data.rowCount + '"><input type="checkbox" name="record" class="checkbox-field"></td><td valign="top"><select name="field_manipulation[' + data.rowCount + '][product_type]" class="select-field"><option value="all">Simple and variable</option><option value="simple">Simple</option><option value="variable">Variable</option></select></td></td><td valign="top"><select name="field_manipulation[' + data.rowCount + '][attribute]" id="field_manipulation_' + data.rowCount + '">' + data.dropdown + '</select></td><td class="becomes_fields_' + data.rowCount + '" valign="top"><select name="field_manipulation[' + data.rowCount + '][becomes][1][attribute]" id="field_manipulation_becomes_' + data.rowCount + '">' + data.dropdown + '</select><td><span class="dashicons dashicons-plus field_extra field_manipulation_extra_' + data.rowCount + '" style="display: inline-block;" title="Add an attribute to this field"></span></td></tr>').insertBefore(".rules-buttons");
|
23 |
+
}
|
24 |
+
|
25 |
+
// Check if user selected a data manipulation condition
|
26 |
+
jQuery(".field_manipulation_extra_" + rowCount).on("click", function(){
|
27 |
+
plusCount = Math.round(new Date().getTime() + (Math.random() * 100));
|
28 |
+
jQuery(".becomes_fields_" + rowCount).append('<br/><select name="field_manipulation[' + data.rowCount + '][becomes][' + plusCount + '][attribute]" id="field_manipulation_becomes_attribute_' + data.rowCount + '">' + data.dropdown + '</select>');
|
29 |
+
});
|
30 |
+
|
31 |
+
})
|
32 |
+
.fail(function( data ) {
|
33 |
+
console.log('Failed AJAX Call :( /// Return Data: ' + data);
|
34 |
+
});
|
35 |
+
});
|
36 |
+
|
37 |
+
// Add extra fields to existing field manipulations
|
38 |
+
jQuery(".field_extra").click(function(){
|
39 |
+
var className = $(this).attr("class").split(' ')[3];
|
40 |
+
var rowCount = className.split("_")[3];
|
41 |
+
var plusCount = Math.round(new Date().getTime() + (Math.random() * 100));
|
42 |
+
|
43 |
+
jQuery.ajax({
|
44 |
+
method: "POST",
|
45 |
+
url: ajaxurl,
|
46 |
+
data: { 'action': 'woosea_ajax', 'rowCount': rowCount }
|
47 |
+
})
|
48 |
+
|
49 |
+
.done(function( data ) {
|
50 |
+
data = JSON.parse( data );
|
51 |
+
jQuery(".becomes_fields_" + rowCount).append('<br/><select name="field_manipulation[' + rowCount + '][becomes][' + plusCount + '][attribute]" id="field_manipulation_becomes_attribute_' + rowCount + '">' + data.dropdown + '</select>');
|
52 |
+
})
|
53 |
+
.fail(function( data ) {
|
54 |
+
console.log('Failed AJAX Call :( /// Return Data: ' + data);
|
55 |
+
});
|
56 |
+
});
|
57 |
+
|
58 |
// Add standard filters
|
59 |
jQuery(".add-filter").click(function(){
|
60 |
// Count amount of rows, used to create the form array field and values
|
112 |
data = JSON.parse( data );
|
113 |
|
114 |
if(TrueRowCount == 0){
|
115 |
+
$( '#woosea-ajax-table' ).find('tbody:first').append('<tr><td><input type="hidden" name="rules2[' + data.rowCount + '][rowCount]" value="' + data.rowCount + '"><input type="checkbox" name="record" class="checkbox-field"></td><td><i>Rule:</i></td><td><select name="rules2[' + data.rowCount + '][attribute]" class="select-field">' + data.dropdown + '</select></td><td><select name="rules2[' + data.rowCount + '][condition]" class="select-field" id="condition_' + data.rowCount + '""><option value="contains">contains</option><option value="containsnot">does not contain</option><option value="=">is equal to</option><option value="!=">is not equal to</option><option value=">">is greater than</option><option value=">=">is greater or equal to</option><option value="<">is less than</option><option value="=<">is less or equal to</option><option value="empty">is empty</option><option value="multiply">multiply</option><option value="divide">divide</option><option value="plus">plus</option><option value="minus">minus</option></select></td><td><input type="text" name="rules2[' + rowCount + '][criteria]" class="input-field-large"></td><td><input type="checkbox" name="rules2[' + rowCount + '][cs]" class="checkbox-field" alt="Case sensitive" id="cs_' + data.rowCount + '"></td><td><select name="rules2[' + data.rowCount + '][than_attribute]" class="select-field" id="than_attribute_' + rowCount +'" style="width:150px;">' + data.dropdown + '</select> </td><td><input type="text" name="rules2[' + rowCount + '][newvalue]" class="input-field-large" id="is-field_' + rowCount +'"></td></tr>');
|
116 |
} else {
|
117 |
+
$('<tr><td><input type="hidden" name="rules2[' + data.rowCount + '][rowCount]" value="' + data.rowCount + '"><input type="checkbox" name="record" class="checkbox-field"></td><td><i>Rule:</i></td><td><select name="rules2[' + data.rowCount + '][attribute]" class="select-field">' + data.dropdown + '</select></td><td><select name="rules2[' + data.rowCount + '][condition]" class="select-field" id="condition_' + data.rowCount + '""><option value="contains">contains</option><option value="containsnot">does not contain</option><option value="=">is equal to</option><option value="!=">is not equal to</option><option value=">">is greater than</option><option value=">=">is greater or equal to</option><option value="<">is less than</option><option value="=<">is less or equal to</option><option value="empty">is empty</option><option value="multiply">multiply</option><option value="divide">divide</option><option value="plus">plus</option><option value="minus">minus</option></select></td><td><input type="text" name="rules2[' + rowCount + '][criteria]" class="input-field-large"></td><td><input type="checkbox" name="rules2[' + rowCount + '][cs]" class="checkbox-field" alt="Case sensitive" id="cs_' + data.rowCount + '"></td><td><select name="rules2[' + data.rowCount + '][than_attribute]" class="select-field" id="than_attribute_' + rowCount +'" style="width:150px;">' + data.dropdown + '</select> </td><td><input type="text" name="rules2[' + rowCount + '][newvalue]" class="input-field-large" id="is-field_' + rowCount +'"></td></tr>').insertBefore( ".rules-buttons");
|
118 |
}
|
119 |
|
120 |
// Check if user selected a data manipulation condition
|
js/woosea_validation.js
CHANGED
@@ -147,9 +147,6 @@ jQuery(document).ready(function($) {
|
|
147 |
}
|
148 |
});
|
149 |
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
// Validate woosea Optimized title field
|
154 |
$( "#_woosea_optimized_title" ).blur("input", function(){
|
155 |
var input=$(this);
|
147 |
}
|
148 |
});
|
149 |
|
|
|
|
|
|
|
150 |
// Validate woosea Optimized title field
|
151 |
$( "#_woosea_optimized_title" ).blur("input", function(){
|
152 |
var input=$(this);
|
pages/admin/woosea-generate-feed-step-0.php
CHANGED
@@ -7,7 +7,7 @@ $host = $_SERVER['HTTP_HOST'];
|
|
7 |
* Change default footer text, asking to review our plugin
|
8 |
**/
|
9 |
function my_footer_text($default) {
|
10 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
11 |
}
|
12 |
add_filter('admin_footer_text', 'my_footer_text');
|
13 |
|
@@ -80,23 +80,25 @@ if (array_key_exists('project_hash', $_GET)){
|
|
80 |
<?php
|
81 |
if($license_information['license_valid'] <> "true"){
|
82 |
?>
|
83 |
-
|
84 |
<p>
|
85 |
-
<strong
|
86 |
-
<span class="dashicons dashicons-yes"></span
|
87 |
-
<span class="dashicons dashicons-yes"></span
|
88 |
-
<span class="dashicons dashicons-yes"></span
|
89 |
-
<span class="dashicons dashicons-yes"></span
|
90 |
-
<span class="dashicons dashicons-yes"></span
|
91 |
-
|
|
|
92 |
</p>
|
93 |
-
</div>
|
94 |
-
|
|
|
95 |
}
|
96 |
?>
|
97 |
|
98 |
|
99 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
100 |
|
101 |
<form action="" id="myForm" method="post" name="myForm">
|
102 |
|
@@ -107,7 +109,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
107 |
<tbody class="woo-product-feed-pro-body">
|
108 |
<div id="projecterror"></div>
|
109 |
<tr>
|
110 |
-
<td width="30%"><span
|
111 |
<td>
|
112 |
<div style="display: block;">
|
113 |
<?php
|
@@ -130,8 +132,12 @@ if (array_key_exists('project_hash', $_GET)){
|
|
130 |
print " <td>";
|
131 |
print " <select name=\"AELIA\" class=\"aelia_switch\">";
|
132 |
foreach ($aelia_currencies as $key => $value){
|
133 |
-
if($
|
134 |
-
|
|
|
|
|
|
|
|
|
135 |
} else {
|
136 |
print "<option value=\"$value\">$value</option>";
|
137 |
}
|
@@ -255,7 +261,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
255 |
}
|
256 |
?>
|
257 |
<tr>
|
258 |
-
<td><span
|
259 |
<td>
|
260 |
<?php
|
261 |
if (isset($manage_project)){
|
@@ -264,7 +270,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
264 |
print"<select name=\"countries\" id=\"countries\" class=\"select-field\">";
|
265 |
}
|
266 |
?>
|
267 |
-
<option
|
268 |
<?php
|
269 |
foreach ($countries as $value){
|
270 |
if((isset($project)) AND ($value == $project['countries'])){
|
@@ -278,7 +284,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
278 |
</td>
|
279 |
</tr>
|
280 |
<tr>
|
281 |
-
<td><span
|
282 |
<td>
|
283 |
<?php
|
284 |
if (isset($manage_project)){
|
@@ -380,7 +386,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
380 |
</td>
|
381 |
</tr>
|
382 |
<tr id="product_variations">
|
383 |
-
<td><span
|
384 |
<td>
|
385 |
<label class="woo-product-feed-pro-switch">
|
386 |
<?php
|
@@ -395,7 +401,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
395 |
</td>
|
396 |
</tr>
|
397 |
<tr id="default_variation">
|
398 |
-
<td><span
|
399 |
<td>
|
400 |
<label class="woo-product-feed-pro-switch">
|
401 |
<?php
|
@@ -410,7 +416,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
410 |
</td>
|
411 |
</tr>
|
412 |
<tr id="file">
|
413 |
-
<td><span
|
414 |
<td>
|
415 |
<select name="fileformat" id="fileformat" class="select-field">
|
416 |
<?php
|
@@ -428,7 +434,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
428 |
</td>
|
429 |
</tr>
|
430 |
<tr id="delimiter">
|
431 |
-
<td><span
|
432 |
<td>
|
433 |
<select name="delimiter" class="select-field">
|
434 |
<?php
|
@@ -445,7 +451,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
445 |
</td>
|
446 |
</tr>
|
447 |
<tr>
|
448 |
-
<td><span
|
449 |
<td>
|
450 |
<select name="cron" class="select-field">
|
451 |
<?php
|
@@ -489,21 +495,21 @@ if (array_key_exists('project_hash', $_GET)){
|
|
489 |
?>
|
490 |
<table class="woo-product-feed-pro-table">
|
491 |
<tr>
|
492 |
-
<td><strong
|
493 |
</tr>
|
494 |
<tr>
|
495 |
<td>
|
496 |
-
Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!
|
497 |
<ul>
|
498 |
-
<li><strong>1.</strong> Priority support: get your feeds live faster
|
499 |
-
<li><strong>2.</strong> More products approved by Google
|
500 |
-
<li><strong>3.</strong> Add GTIN, brand and more fields to your store
|
501 |
-
<li><strong>4.</strong> Exclude individual products from your feeds
|
502 |
-
<li><strong>5.</strong> WPML support
|
503 |
-
<li><strong>6.</strong> Aelia currency switcher support
|
504 |
</ul>
|
505 |
<strong>
|
506 |
-
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=page-0&utm_campaign=why-upgrade-box" target="_blank"
|
507 |
</strong>
|
508 |
</td>
|
509 |
</tr>
|
@@ -514,37 +520,38 @@ if (array_key_exists('project_hash', $_GET)){
|
|
514 |
|
515 |
<table class="woo-product-feed-pro-table">
|
516 |
<tr>
|
517 |
-
<td><strong
|
518 |
</tr>
|
519 |
<tr>
|
520 |
<td>
|
521 |
-
Need assistance? Check out our:
|
522 |
<ul>
|
523 |
-
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=page-0&utm_campaign=faq" target="_blank"
|
524 |
-
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"
|
525 |
-
<li><strong><a href="https://adtribes.io/
|
526 |
</ul>
|
527 |
-
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"
|
528 |
</td>
|
529 |
</tr>
|
530 |
</table><br/>
|
531 |
|
532 |
<table class="woo-product-feed-pro-table">
|
533 |
<tr>
|
534 |
-
<td><strong
|
535 |
</tr>
|
536 |
<tr>
|
537 |
<td>
|
538 |
<ul>
|
539 |
-
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=first shopping feed" target="_blank"
|
540 |
-
|
541 |
-
|
542 |
-
<li><strong>4. <a href="https://adtribes.io/
|
543 |
-
<li><strong>5. <a href="https://adtribes.io/
|
544 |
-
<li><strong>6. <a href="https://adtribes.io/
|
545 |
-
|
546 |
-
<li><strong>
|
547 |
-
|
|
|
548 |
</ul>
|
549 |
</td>
|
550 |
</tr>
|
7 |
* Change default footer text, asking to review our plugin
|
8 |
**/
|
9 |
function my_footer_text($default) {
|
10 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro') ;
|
11 |
}
|
12 |
add_filter('admin_footer_text', 'my_footer_text');
|
13 |
|
80 |
<?php
|
81 |
if($license_information['license_valid'] <> "true"){
|
82 |
?>
|
83 |
+
<div class="notice notice-info is-dismissible">
|
84 |
<p>
|
85 |
+
<strong><?php _e( 'Would you like to get more out of your product feeds? Upgrade to the Elite version of the plugin and you will get:','woo-product-feed-pro' );?></strong><br/></br/>
|
86 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'Priority support - we will help you to get your product feed(s) up-and-running;','woo-product-feed-pro' );?><br/>
|
87 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'GTIN, Brand, MPN, EAN, Condition and more fields for your product feeds','woo-product-feed-pro' );?> [<a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=adding%20fields" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
88 |
+
<span class="dashicons dashicons-yes"></span><?php _e('Enhanched structured data on your product pages: more products approved in your Google Merchant Center','woo-product-feed-pro' );?> [<a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=structured%20data%20bug" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
89 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'Advanced product data manipulation','woo-product-feed-pro' );?> [<a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=product%20data%20manipulation" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
90 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'WPML support - including their currency switcher','woo-product-feed-pro' );?> [<a href="https://adtribes.io/wpml-support/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=wpml%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
91 |
+
<span class="dashicons dashicons-yes"></span>Aelia currency switcher support [<a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=aelia%20support" target="_blank">read more</a>];<br/><br/>
|
92 |
+
<?php _e( 'Upgrade to the','woo-product-feed-pro' );?> <a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_content=notification" target="_blank"><?php _e( 'Elite version of our plugin</a> to unlock these features.','woo-product-feed-pro' );?>
|
93 |
</p>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<?php
|
97 |
}
|
98 |
?>
|
99 |
|
100 |
|
101 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'General feed settings','woo-product-feed-pro' );?></div>
|
102 |
|
103 |
<form action="" id="myForm" method="post" name="myForm">
|
104 |
|
109 |
<tbody class="woo-product-feed-pro-body">
|
110 |
<div id="projecterror"></div>
|
111 |
<tr>
|
112 |
+
<td width="30%"><span><?php _e( 'Project name','woo-product-feed-pro' );?>:<span class="required">*</span></span></td>
|
113 |
<td>
|
114 |
<div style="display: block;">
|
115 |
<?php
|
132 |
print " <td>";
|
133 |
print " <select name=\"AELIA\" class=\"aelia_switch\">";
|
134 |
foreach ($aelia_currencies as $key => $value){
|
135 |
+
if(isset($project['AELIA'])){
|
136 |
+
if($value == $project['AELIA']){
|
137 |
+
print "<option value=\"$value\" selected>$value</option>";
|
138 |
+
} else {
|
139 |
+
print "<option value=\"$value\">$value</option>";
|
140 |
+
}
|
141 |
} else {
|
142 |
print "<option value=\"$value\">$value</option>";
|
143 |
}
|
261 |
}
|
262 |
?>
|
263 |
<tr>
|
264 |
+
<td><span><?php _e( 'Country','woo-product-feed-pro' );?>:</span></td>
|
265 |
<td>
|
266 |
<?php
|
267 |
if (isset($manage_project)){
|
270 |
print"<select name=\"countries\" id=\"countries\" class=\"select-field\">";
|
271 |
}
|
272 |
?>
|
273 |
+
<option><?php _e( 'Select a country','woo-product-feed-pro' );?></option>
|
274 |
<?php
|
275 |
foreach ($countries as $value){
|
276 |
if((isset($project)) AND ($value == $project['countries'])){
|
284 |
</td>
|
285 |
</tr>
|
286 |
<tr>
|
287 |
+
<td><span><?php _e( 'Channel','woo-product-feed-pro' );?>:</span></td>
|
288 |
<td>
|
289 |
<?php
|
290 |
if (isset($manage_project)){
|
386 |
</td>
|
387 |
</tr>
|
388 |
<tr id="product_variations">
|
389 |
+
<td><span><?php _e('Include product variations','woo-product-feed-pro' );?>:</span></td>
|
390 |
<td>
|
391 |
<label class="woo-product-feed-pro-switch">
|
392 |
<?php
|
401 |
</td>
|
402 |
</tr>
|
403 |
<tr id="default_variation">
|
404 |
+
<td><span><?php _e( 'Only include default product variation','woo-product-feed-pro' );?>:</span></td>
|
405 |
<td>
|
406 |
<label class="woo-product-feed-pro-switch">
|
407 |
<?php
|
416 |
</td>
|
417 |
</tr>
|
418 |
<tr id="file">
|
419 |
+
<td><span><?php _e( 'File format','woo-product-feed-pro' );?>:</span></td>
|
420 |
<td>
|
421 |
<select name="fileformat" id="fileformat" class="select-field">
|
422 |
<?php
|
434 |
</td>
|
435 |
</tr>
|
436 |
<tr id="delimiter">
|
437 |
+
<td><span><?php _e( 'Delimiter','woo-product-feed-pro' );?>:</span></td>
|
438 |
<td>
|
439 |
<select name="delimiter" class="select-field">
|
440 |
<?php
|
451 |
</td>
|
452 |
</tr>
|
453 |
<tr>
|
454 |
+
<td><span><?php _e( 'Refresh interval','woo-product-feed-pro' );?>:</span></td>
|
455 |
<td>
|
456 |
<select name="cron" class="select-field">
|
457 |
<?php
|
495 |
?>
|
496 |
<table class="woo-product-feed-pro-table">
|
497 |
<tr>
|
498 |
+
<td><strong><?php _e( 'Why upgrade to Elite?','woo-product-feed-pro' );?></strong></td>
|
499 |
</tr>
|
500 |
<tr>
|
501 |
<td>
|
502 |
+
<?php _e( 'Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!','woo-product-feed-pro' );?>
|
503 |
<ul>
|
504 |
+
<li><strong>1.</strong> <?php _e( 'Priority support: get your feeds live faster','woo-product-feed-pro' );?></li>
|
505 |
+
<li><strong>2.</strong> <?php _e( 'More products approved by Google','woo-product-feed-pro' );?></li>
|
506 |
+
<li><strong>3.</strong> <?php _e( 'Add GTIN, brand and more fields to your store','woo-product-feed-pro' );?></li>
|
507 |
+
<li><strong>4.</strong> <?php _e( 'Exclude individual products from your feeds','woo-product-feed-pro' );?></li>
|
508 |
+
<li><strong>5.</strong> <?php _e( 'WPML support','woo-product-feed-pro' );?></li>
|
509 |
+
<li><strong>6.</strong> <?php _e( 'Aelia currency switcher support','woo-product-feed-pro' );?></li>
|
510 |
</ul>
|
511 |
<strong>
|
512 |
+
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=page-0&utm_campaign=why-upgrade-box" target="_blank"><?php _e( 'Upgrade to Elite here!','woo-product-feed-pro' );?></a>
|
513 |
</strong>
|
514 |
</td>
|
515 |
</tr>
|
520 |
|
521 |
<table class="woo-product-feed-pro-table">
|
522 |
<tr>
|
523 |
+
<td><strong><?php _e( 'We’ve got you covered!','woo-product-feed-pro' );?></strong></td>
|
524 |
</tr>
|
525 |
<tr>
|
526 |
<td>
|
527 |
+
<?php _e( 'Need assistance? Check out our:','woo-product-feed-pro' );?>
|
528 |
<ul>
|
529 |
+
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=page-0&utm_campaign=faq" target="_blank"><?php _e( 'Frequently Asked Questions','woo-product-feed-pro' );?></a></strong></li>
|
530 |
+
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"><?php _e( 'YouTube tutorials','woo-product-feed-pro' );?></a></strong></li>
|
531 |
+
<li><strong><a href="https://adtribes.io/tutorials/?utm_source=<?php print "$host";?>&utm_medium=page-0&utm_campaign=tutorials" target="_blank"><?php _e( 'Tutorials','woo-product-feed-pro' );?></a></strong></li>
|
532 |
</ul>
|
533 |
+
<?php _e( 'Or just reach out to us at','woo-product-feed-pro' );?> <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"><?php _e( 'our Wordpress forum','woo-product-feed-pro' );?></a></strong> <?php _e( 'and we will make sure your product feeds will be up-and-running within no-time.','woo-product-feed-pro' );?>
|
534 |
</td>
|
535 |
</tr>
|
536 |
</table><br/>
|
537 |
|
538 |
<table class="woo-product-feed-pro-table">
|
539 |
<tr>
|
540 |
+
<td><strong><?php _e( 'Our latest tutorials','woo-product-feed-pro' );?></strong></td>
|
541 |
</tr>
|
542 |
<tr>
|
543 |
<td>
|
544 |
<ul>
|
545 |
+
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=first shopping feed" target="_blank"><?php _e( 'Create a Google Shopping feed','woo-product-feed-pro' );?></a></strong></li>
|
546 |
+
<li><strong>2. <a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=product_data_manipulation" target="_blank"><?php _e( 'Product data manipulation','woo-product-feed-pro' );?></a></strong></li>
|
547 |
+
<li><strong>3. <a href="https://adtribes.io/how-to-create-filters-for-your-product-feed/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=how to create filters" target="_blank"><?php _e( 'How to create filters for your product feed','woo-product-feed-pro' );?></a></strong></li>
|
548 |
+
<li><strong>4. <a href="https://adtribes.io/how-to-create-rules/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=how to create rules" target="_blank"><?php _e('How to set rules for your product feed','woo-product-feed-pro' );?></a></strong></li>
|
549 |
+
<li><strong>5. <a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=adding fields" target="_blank"><?php _e( 'Adding GTIN, Brand, MPN and more','woo-product-feed-pro' );?></a></strong></li>
|
550 |
+
<li><strong>6. <a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=structured data bug" target="_blank"><?php _e('WooCommerce structured data markup bug','woo-product-feed-pro' );?></a></strong></li>
|
551 |
+
<li><strong>7. <a href="https://adtribes.io/wpml-support/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=wpml support" target="_blank"><?php _e( 'Enable WPML support','woo-product-feed-pro' );?></a></strong></li>
|
552 |
+
<li><strong>8. <a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=page0&utm_campaign=aelia support" target="_blank"><?php _e( 'Enable Aelia currency switcher support','woo-product-feed-pro' );?></a></strong></li>
|
553 |
+
<li><strong>9. <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=feed stuck" target="_blank"><?php _e( 'Help, my feed is stuck!','woo-product-feed-pro' );?></a></strong></li>
|
554 |
+
<li><strong>10. <a href="https://adtribes.io/help-i-have-none-or-less-products-in-my-product-feed-than-expected/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=too few products" target="_blank"><?php _e( 'Help, my feed has no or too few products!','woo-product-feed-pro' );?></a></strong></li>
|
555 |
</ul>
|
556 |
</td>
|
557 |
</tr>
|
pages/admin/woosea-generate-feed-step-1.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
delete_option( 'woosea_cat_mapping' );
|
@@ -87,7 +87,7 @@ function woosea_hierarchical_term_tree($category, $prev_mapped){
|
|
87 |
$nr_subcats = count($subcat);
|
88 |
|
89 |
$r .= "<tr class=\"catmapping\">";
|
90 |
-
$r .= "<td><input type=\"hidden\" name=\"mappings[$x][rowCount]\" value=\"$x\"><input type=\"hidden\" name=\"mappings[$x][categoryId]\" value=\"$woo_category_id\"><input type=\"hidden\" name=\"mappings[$x][criteria]\" class=\"input-field-large\" id=\"$woo_category_id\" value
|
91 |
$r .= "<td><input type=\"search\" name=\"mappings[$x][map_to_category]\" class=\"$mapped_active_class js-typeahead js-autosuggest autocomplete_$x\" value=\"$mapped_category\"></td>";
|
92 |
if(($yo == $nr_categories) AND ($nr_subcats == 0)){
|
93 |
$r .= "<td><span class=\"copy_category_$x\" style=\"display: inline-block;\" title=\"Copy this category to all others\"></span></td>";
|
@@ -101,7 +101,7 @@ function woosea_hierarchical_term_tree($category, $prev_mapped){
|
|
101 |
$r .= "</tr>";
|
102 |
} else {
|
103 |
$r .= "<tr class=\"catmapping\">";
|
104 |
-
$r .= "<td><input type=\"hidden\" name=\"mappings[$x][rowCount]\" value=\"$x\"><input type=\"hidden\" name=\"mappings[$x][categoryId]\" value=\"$woo_category_id\"><input type=\"hidden\" name=\"mappings[$x][criteria]\" class=\"input-field-large\" id=\"$woo_category_id\" value
|
105 |
$r .= "<td><input type=\"search\" name=\"mappings[$x][map_to_category]\" class=\"$mapped_active_class js-typeahead js-autosuggest autocomplete_$x mother_$sub_category->parent\" value=\"$mapped_category\"></td>";
|
106 |
$r .= "<td><span class=\"copy_category_$x\" style=\"display: inline-block;\" title=\"Copy this category to all others\"></span></td>";
|
107 |
$r .= "</tr>";
|
@@ -115,7 +115,7 @@ function woosea_hierarchical_term_tree($category, $prev_mapped){
|
|
115 |
|
116 |
<div class="wrap">
|
117 |
<div class="woo-product-feed-pro-form-style-2">
|
118 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
119 |
|
120 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
121 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
@@ -127,8 +127,8 @@ function woosea_hierarchical_term_tree($category, $prev_mapped){
|
|
127 |
<table id="woosea-ajax-mapping-table" class="woo-product-feed-pro-table" border="1">
|
128 |
<thead>
|
129 |
<tr>
|
130 |
-
<th
|
131 |
-
<th><?php print "$channel_data[name]";?> category
|
132 |
<th></th>
|
133 |
</tr>
|
134 |
</thead>
|
@@ -185,21 +185,21 @@ function woosea_hierarchical_term_tree($category, $prev_mapped){
|
|
185 |
?>
|
186 |
<table class="woo-product-feed-pro-table">
|
187 |
<tr>
|
188 |
-
<td><strong
|
189 |
</tr>
|
190 |
<tr>
|
191 |
<td>
|
192 |
-
Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!
|
193 |
<ul>
|
194 |
-
<li><strong>1.</strong> Priority support: get your feeds live faster
|
195 |
-
<li><strong>2.</strong> More products approved by Google
|
196 |
-
<li><strong>3.</strong> Add GTIN, brand and more fields to your store
|
197 |
-
<li><strong>4.</strong> Exclude individual products from your feeds
|
198 |
-
<li><strong>5.</strong> WPML support
|
199 |
-
<li><strong>6.</strong> Aelia currency switcher support
|
200 |
</ul>
|
201 |
<strong>
|
202 |
-
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=page1&utm_campaign=why-upgrade-box" target="_blank"
|
203 |
</strong>
|
204 |
</td>
|
205 |
</tr>
|
@@ -210,37 +210,38 @@ function woosea_hierarchical_term_tree($category, $prev_mapped){
|
|
210 |
|
211 |
<table class="woo-product-feed-pro-table">
|
212 |
<tr>
|
213 |
-
<td><strong
|
214 |
</tr>
|
215 |
<tr>
|
216 |
<td>
|
217 |
-
Need assistance? Check out our:
|
218 |
<ul>
|
219 |
-
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=page1&utm_campaign=faq" target="_blank"
|
220 |
-
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"
|
221 |
-
<li><strong><a href="https://adtribes.io/
|
222 |
</ul>
|
223 |
-
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"
|
224 |
</td>
|
225 |
</tr>
|
226 |
</table><br/>
|
227 |
|
228 |
<table class="woo-product-feed-pro-table">
|
229 |
<tr>
|
230 |
-
<td><strong
|
231 |
</tr>
|
232 |
<tr>
|
233 |
<td>
|
234 |
<ul>
|
235 |
-
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=first shopping feed" target="_blank"
|
236 |
-
|
237 |
-
|
238 |
-
<li><strong>4. <a href="https://adtribes.io/
|
239 |
-
<li><strong>5. <a href="https://adtribes.io/
|
240 |
-
<li><strong>6. <a href="https://adtribes.io/
|
241 |
-
|
242 |
-
<li><strong>
|
243 |
-
|
|
|
244 |
</ul>
|
245 |
</td>
|
246 |
</tr>
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro');
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
delete_option( 'woosea_cat_mapping' );
|
87 |
$nr_subcats = count($subcat);
|
88 |
|
89 |
$r .= "<tr class=\"catmapping\">";
|
90 |
+
$r .= "<td><input type=\"hidden\" name=\"mappings[$x][rowCount]\" value=\"$x\"><input type=\"hidden\" name=\"mappings[$x][categoryId]\" value=\"$woo_category_id\"><input type=\"hidden\" name=\"mappings[$x][criteria]\" class=\"input-field-large\" id=\"$woo_category_id\" value=\"$woo_category\">$woo_category ($sub_category->count)</td>";
|
91 |
$r .= "<td><input type=\"search\" name=\"mappings[$x][map_to_category]\" class=\"$mapped_active_class js-typeahead js-autosuggest autocomplete_$x\" value=\"$mapped_category\"></td>";
|
92 |
if(($yo == $nr_categories) AND ($nr_subcats == 0)){
|
93 |
$r .= "<td><span class=\"copy_category_$x\" style=\"display: inline-block;\" title=\"Copy this category to all others\"></span></td>";
|
101 |
$r .= "</tr>";
|
102 |
} else {
|
103 |
$r .= "<tr class=\"catmapping\">";
|
104 |
+
$r .= "<td><input type=\"hidden\" name=\"mappings[$x][rowCount]\" value=\"$x\"><input type=\"hidden\" name=\"mappings[$x][categoryId]\" value=\"$woo_category_id\"><input type=\"hidden\" name=\"mappings[$x][criteria]\" class=\"input-field-large\" id=\"$woo_category_id\" value=\"$woo_category\">-- $woo_category ($sub_category->count)</td>";
|
105 |
$r .= "<td><input type=\"search\" name=\"mappings[$x][map_to_category]\" class=\"$mapped_active_class js-typeahead js-autosuggest autocomplete_$x mother_$sub_category->parent\" value=\"$mapped_category\"></td>";
|
106 |
$r .= "<td><span class=\"copy_category_$x\" style=\"display: inline-block;\" title=\"Copy this category to all others\"></span></td>";
|
107 |
$r .= "</tr>";
|
115 |
|
116 |
<div class="wrap">
|
117 |
<div class="woo-product-feed-pro-form-style-2">
|
118 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Category mapping','woo-product-feed-pro' );?></div>
|
119 |
|
120 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
121 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
127 |
<table id="woosea-ajax-mapping-table" class="woo-product-feed-pro-table" border="1">
|
128 |
<thead>
|
129 |
<tr>
|
130 |
+
<th><?php _e( 'Your category','woo-product-feed-pro' );?> <i>(<?php _e( 'Number of products','woo-product-feed-pro' );?>)</i></th>
|
131 |
+
<th><?php print "$channel_data[name]";?> <?php _e( 'category','woo-product-feed-pro' );?></th>
|
132 |
<th></th>
|
133 |
</tr>
|
134 |
</thead>
|
185 |
?>
|
186 |
<table class="woo-product-feed-pro-table">
|
187 |
<tr>
|
188 |
+
<td><strong><?php _e( 'Why upgrade to Elite?','woo-product-feed-pro' );?></strong></td>
|
189 |
</tr>
|
190 |
<tr>
|
191 |
<td>
|
192 |
+
<?php _e( 'Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!','woo-product-feed-pro' );?>
|
193 |
<ul>
|
194 |
+
<li><strong>1.</strong> <?php _e( 'Priority support: get your feeds live faster','woo-product-feed-pro' );?></li>
|
195 |
+
<li><strong>2.</strong> <?php _e( 'More products approved by Google','woo-product-feed-pro' );?></li>
|
196 |
+
<li><strong>3.</strong> <?php _e( 'Add GTIN, brand and more fields to your store','woo-product-feed-pro' );?></li>
|
197 |
+
<li><strong>4.</strong> <?php _e( 'Exclude individual products from your feeds','woo-product-feed-pro' );?></li>
|
198 |
+
<li><strong>5.</strong> <?php _e( 'WPML support','woo-product-feed-pro' );?></li>
|
199 |
+
<li><strong>6.</strong> <?php _e( 'Aelia currency switcher support','woo-product-feed-pro' );?></li>
|
200 |
</ul>
|
201 |
<strong>
|
202 |
+
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=page1&utm_campaign=why-upgrade-box" target="_blank"><?php _e( 'Upgrade to Elite here!','woo-product-feed-pro' );?></a>
|
203 |
</strong>
|
204 |
</td>
|
205 |
</tr>
|
210 |
|
211 |
<table class="woo-product-feed-pro-table">
|
212 |
<tr>
|
213 |
+
<td><strong><?php _e( 'We\’ve got you covered!','woo-product-feed-pro' );?></strong></td>
|
214 |
</tr>
|
215 |
<tr>
|
216 |
<td>
|
217 |
+
<?php _e( 'Need assistance? Check out our:','woo-product-feed-pro' );?>
|
218 |
<ul>
|
219 |
+
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=page1&utm_campaign=faq" target="_blank"><?php _e( 'Frequently Asked Questions','woo-product-feed-pro' );?></a></strong></li>
|
220 |
+
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"><?php _e( 'YouTube tutorials','woo-product-feed-pro' );?></a></strong></li>
|
221 |
+
<li><strong><a href="https://adtribes.io/tutorials/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=tutorials" target="_blank"><?php _e( 'Tutorials','woo-product-feed-pro' );?></a></strong></li>
|
222 |
</ul>
|
223 |
+
<?php _e ('Or just reach out to us at','woo-product-feed-pro' );?> <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"><?php _e( 'our Wordpress forum','woo-product-feed-pro' );?></a></strong> <?php _e( 'and we will make sure your product feeds will be up-and-running within no-time.','woo-product-feed-pro' );?>
|
224 |
</td>
|
225 |
</tr>
|
226 |
</table><br/>
|
227 |
|
228 |
<table class="woo-product-feed-pro-table">
|
229 |
<tr>
|
230 |
+
<td><strong><?php _e( 'Our latest tutorials','woo-product-feed-pro' );?></strong></td>
|
231 |
</tr>
|
232 |
<tr>
|
233 |
<td>
|
234 |
<ul>
|
235 |
+
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=first shopping feed" target="_blank"><?php _e( 'Create a Google Shopping feed','woo-product-feed-pro' );?></a></strong></li>
|
236 |
+
<li><strong>2. <a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=product_data_manipulation" target="_blank"><?php _e( 'Product data manipulation','woo-product-feed-pro' );?></a></strong></li>
|
237 |
+
<li><strong>3. <a href="https://adtribes.io/how-to-create-filters-for-your-product-feed/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=how to create filters" target="_blank"><?php _e( 'How to create filters for your product feed','woo-product-feed-pro' );?></a></strong></li>
|
238 |
+
<li><strong>4. <a href="https://adtribes.io/how-to-create-rules/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=how to create rules" target="_blank"><?php _e( 'How to set rules for your product feed','woo-product-feed-pro' );?></a></strong></li>
|
239 |
+
<li><strong>5. <a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=adding fields" target="_blank"><?php _e( 'Adding GTIN, Brand, MPN and more','woo-product-feed-pro' );?></a></strong></li>
|
240 |
+
<li><strong>6. <a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=structured data bug" target="_blank"><?php _e( 'WooCommerce structured data markup bug','woo-product-feed-pro' );?></a></strong></li>
|
241 |
+
<li><strong>7. <a href="https://adtribes.io/wpml-support/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=wpml support" target="_blank"><?php _e( 'Enable WPML support','woo-product-feed-pro' );?></a></strong></li>
|
242 |
+
<li><strong>8. <a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=page1&utm_campaign=aelia support" target="_blank"><?php _e( 'Enable Aelia currency switcher support','woo-product-feed-pro' );?></a></strong></li>
|
243 |
+
<li><strong>9. <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=feed stuck" target="_blank"><?php _e( 'Help, my feed is stuck!','woo-product-feed-pro' );?></a></strong></li>
|
244 |
+
<li><strong>10. <a href="https://adtribes.io/help-i-have-none-or-less-products-in-my-product-feed-than-expected/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=too few products" target="_blank"><?php _e( 'Help, my feed has no or too few products!','woo-product-feed-pro' );?></a></strong></li>
|
245 |
</ul>
|
246 |
</td>
|
247 |
</tr>
|
pages/admin/woosea-generate-feed-step-4.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
@@ -44,7 +44,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
44 |
?>
|
45 |
<div class="wrap">
|
46 |
<div class="woo-product-feed-pro-form-style-2">
|
47 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
48 |
|
49 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
50 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
@@ -55,13 +55,13 @@ if (array_key_exists('project_hash', $_GET)){
|
|
55 |
<thead>
|
56 |
<tr>
|
57 |
<th></th>
|
58 |
-
<th
|
59 |
-
<th
|
60 |
-
<th
|
61 |
-
<th
|
62 |
-
<th
|
63 |
-
<th
|
64 |
-
<th
|
65 |
</tr>
|
66 |
</thead>
|
67 |
|
@@ -79,7 +79,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
79 |
?>
|
80 |
<tr class="rowCount">
|
81 |
<td><input type="hidden" name="rules[<?php print "$rule_key";?>][rowCount]" value="<?php print "$rule_key";?>"><input type="checkbox" name="record" class="checkbox-field"></td>
|
82 |
-
<td><i
|
83 |
<td>
|
84 |
<select name="rules[<?php print "$rule_key";?>][attribute]" class="select-field">
|
85 |
<option></option>
|
@@ -211,7 +211,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
211 |
?>
|
212 |
<tr class="rowCount">
|
213 |
<td><input type="hidden" name="rules2[<?php print "$rule2_key";?>][rowCount]" value="<?php print "$rule2_key";?>"><input type="checkbox" name="record" class="checkbox-field"></td>
|
214 |
-
<td><i
|
215 |
<td>
|
216 |
<select name="rules2[<?php print "$rule2_key";?>][attribute]" class="select-field">
|
217 |
<option></option>
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro' );
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
44 |
?>
|
45 |
<div class="wrap">
|
46 |
<div class="woo-product-feed-pro-form-style-2">
|
47 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Feed filters and rules','woo-product-feed-pro' );?></div>
|
48 |
|
49 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
50 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
55 |
<thead>
|
56 |
<tr>
|
57 |
<th></th>
|
58 |
+
<th><?php _e( 'Type','woo-product-feed-pro' );?></th>
|
59 |
+
<th><?php _e( 'IF','woo-product-feed-pro' );?></th>
|
60 |
+
<th><?php _e( 'Condition','woo-product-feed-pro' );?></th>
|
61 |
+
<th><?php _e( 'Value','woo-product-feed-pro' );?></th>
|
62 |
+
<th><?php _e( 'CS','woo-product-feed-pro' );?></th>
|
63 |
+
<th><?php _e( 'Then','woo-product-feed-pro' );?></th>
|
64 |
+
<th><?php _e( 'IS','woo-product-feed-pro' );?></th>
|
65 |
</tr>
|
66 |
</thead>
|
67 |
|
79 |
?>
|
80 |
<tr class="rowCount">
|
81 |
<td><input type="hidden" name="rules[<?php print "$rule_key";?>][rowCount]" value="<?php print "$rule_key";?>"><input type="checkbox" name="record" class="checkbox-field"></td>
|
82 |
+
<td><i><?php _e( 'Filter','woo-product-feed-pro' );?></i></td>
|
83 |
<td>
|
84 |
<select name="rules[<?php print "$rule_key";?>][attribute]" class="select-field">
|
85 |
<option></option>
|
211 |
?>
|
212 |
<tr class="rowCount">
|
213 |
<td><input type="hidden" name="rules2[<?php print "$rule2_key";?>][rowCount]" value="<?php print "$rule2_key";?>"><input type="checkbox" name="record" class="checkbox-field"></td>
|
214 |
+
<td><i><?php _e( 'Rule','woo-product-feed-pro' );?></i></td>
|
215 |
<td>
|
216 |
<select name="rules2[<?php print "$rule2_key";?>][attribute]" class="select-field">
|
217 |
<option></option>
|
pages/admin/woosea-generate-feed-step-5.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
@@ -44,7 +44,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
44 |
<div class="wrap">
|
45 |
<div class="woo-product-feed-pro-form-style-2">
|
46 |
<tbody class="woo-product-feed-pro-body">
|
47 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
48 |
|
49 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
50 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
@@ -53,6 +53,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
53 |
<form id="googleanalytics" method="post">
|
54 |
|
55 |
<table class="woo-product-feed-pro-table">
|
|
|
56 |
<tr>
|
57 |
<td><span>Enable conversion tracking: </span></td>
|
58 |
<td>
|
@@ -68,8 +69,9 @@ if (array_key_exists('project_hash', $_GET)){
|
|
68 |
</label>
|
69 |
</td>
|
70 |
</tr>
|
|
|
71 |
<tr>
|
72 |
-
<td><span
|
73 |
<td>
|
74 |
<label class="woo-product-feed-pro-switch">
|
75 |
<?php
|
@@ -84,23 +86,23 @@ if (array_key_exists('project_hash', $_GET)){
|
|
84 |
</td>
|
85 |
</tr>
|
86 |
<tr>
|
87 |
-
<td><span
|
88 |
<td><input type="text" class="input-field" name="utm_source" value="<?php print "$project[utm_source]";?>" /></td>
|
89 |
</tr>
|
90 |
<tr>
|
91 |
-
<td><span
|
92 |
<td><input type="text" class="input-field" name="utm_medium" value="<?php print "$project[utm_medium]";?>" /></td>
|
93 |
</tr>
|
94 |
<tr>
|
95 |
-
<td><span
|
96 |
<td><input type="text" class="input-field" name="utm_campaign" value="<?php print "$project[utm_campaign]";?>" /></td>
|
97 |
</tr>
|
98 |
<tr>
|
99 |
-
<td><span
|
100 |
-
<td><input type="hidden" name="utm_term" value="id"><input type="text" class="input-field" value="[productId]" disabled/> <i>(dynamically added Product ID)</i></td>
|
101 |
</tr>
|
102 |
<tr>
|
103 |
-
<td><span
|
104 |
<td><input type="text" class="input-field" name="utm_content" value="<?php print "$project[utm_content]";?>" /></td>
|
105 |
</tr>
|
106 |
<tr>
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro' );
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
44 |
<div class="wrap">
|
45 |
<div class="woo-product-feed-pro-form-style-2">
|
46 |
<tbody class="woo-product-feed-pro-body">
|
47 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Google Analytics settings','woo-product-feed-pro' );?></div>
|
48 |
|
49 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
50 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
53 |
<form id="googleanalytics" method="post">
|
54 |
|
55 |
<table class="woo-product-feed-pro-table">
|
56 |
+
<!--
|
57 |
<tr>
|
58 |
<td><span>Enable conversion tracking: </span></td>
|
59 |
<td>
|
69 |
</label>
|
70 |
</td>
|
71 |
</tr>
|
72 |
+
-->
|
73 |
<tr>
|
74 |
+
<td><span><?php _e( 'Enable Google Analytics tracking','woo-product-feed-pro' );?>: </span></td>
|
75 |
<td>
|
76 |
<label class="woo-product-feed-pro-switch">
|
77 |
<?php
|
86 |
</td>
|
87 |
</tr>
|
88 |
<tr>
|
89 |
+
<td><span><?php _e( 'Google Analytics campaign source (utm_source)','woo-product-feed-pro' );?>:</span></td>
|
90 |
<td><input type="text" class="input-field" name="utm_source" value="<?php print "$project[utm_source]";?>" /></td>
|
91 |
</tr>
|
92 |
<tr>
|
93 |
+
<td><span><?php _e( 'Google Analytics campaign medium (utm_medium)','woo-product-feed-pro' );?>:</span></td>
|
94 |
<td><input type="text" class="input-field" name="utm_medium" value="<?php print "$project[utm_medium]";?>" /></td>
|
95 |
</tr>
|
96 |
<tr>
|
97 |
+
<td><span><?php _e( 'Google Analytics campaign name (utm_campaign)','woo-product-feed-pro' );?>:</span></td>
|
98 |
<td><input type="text" class="input-field" name="utm_campaign" value="<?php print "$project[utm_campaign]";?>" /></td>
|
99 |
</tr>
|
100 |
<tr>
|
101 |
+
<td><span><?php _e( 'Google Analytics campaign term (utm_term)','woo-product-feed-pro' );?>:</span></td>
|
102 |
+
<td><input type="hidden" name="utm_term" value="id"><input type="text" class="input-field" value="[productId]" disabled/> <i>(<?php _e('dynamically added Product ID','woo-product-feed-pro' );?>)</i></td>
|
103 |
</tr>
|
104 |
<tr>
|
105 |
+
<td><span><?php _e( 'Google Analytics campaign content (utm_content)','woo-product-feed-pro' );?>:</span></td>
|
106 |
<td><input type="text" class="input-field" name="utm_content" value="<?php print "$project[utm_content]";?>" /></td>
|
107 |
</tr>
|
108 |
<tr>
|
pages/admin/woosea-generate-feed-step-7.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
@@ -58,7 +58,6 @@ if($channel_data['taxonomy'] != "none"){
|
|
58 |
$step = 1;
|
59 |
}
|
60 |
|
61 |
-
|
62 |
/**
|
63 |
* Get main currency
|
64 |
**/
|
@@ -107,7 +106,7 @@ if(isset($_POST['product_variations'])){
|
|
107 |
|
108 |
<div class="wrap">
|
109 |
<div class="woo-product-feed-pro-form-style-2">
|
110 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
111 |
|
112 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
113 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
@@ -123,9 +122,9 @@ if(isset($_POST['product_variations'])){
|
|
123 |
print "$channel_data[name] attributes";
|
124 |
?>
|
125 |
</th>
|
126 |
-
<th
|
127 |
-
<th
|
128 |
-
<th
|
129 |
</tr>
|
130 |
</thead>
|
131 |
|
@@ -139,7 +138,21 @@ if(isset($_POST['product_variations'])){
|
|
139 |
if ($row_v['format'] == "required"){
|
140 |
?>
|
141 |
<tr class="rowCount <?php print"$c";?>">
|
142 |
-
<td><input type="hidden" name="attributes[<?php print "$c";?>][rowCount]" value="<?php print "$c";?>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
<td>
|
144 |
<select name="attributes[<?php print"$c"; ?>][attribute]" class="select-field">
|
145 |
<?php
|
@@ -212,7 +225,19 @@ if(isset($_POST['product_variations'])){
|
|
212 |
}
|
213 |
?>
|
214 |
<tr class="rowCount <?php print "$attribute_key";?>">
|
215 |
-
<td><input type="hidden" name="attributes[<?php print "$attribute_key";?>][rowCount]" value="<?php print "$attribute_key";?>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
<td>
|
217 |
<select name="attributes[<?php print"$attribute_key"; ?>][attribute]" class="select-field">
|
218 |
<?php
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro' );
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
58 |
$step = 1;
|
59 |
}
|
60 |
|
|
|
61 |
/**
|
62 |
* Get main currency
|
63 |
**/
|
106 |
|
107 |
<div class="wrap">
|
108 |
<div class="woo-product-feed-pro-form-style-2">
|
109 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Field mapping','woo-product-feed-pro' );?></div>
|
110 |
|
111 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
112 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
122 |
print "$channel_data[name] attributes";
|
123 |
?>
|
124 |
</th>
|
125 |
+
<th><?php _e( 'Prefix','woo-product-feed-pro' );?></th>
|
126 |
+
<th><?php _e( 'Value','woo-product-feed-pro' );?></th>
|
127 |
+
<th><?php _e( 'Suffix','woo-product-feed-pro' );?></th>
|
128 |
</tr>
|
129 |
</thead>
|
130 |
|
138 |
if ($row_v['format'] == "required"){
|
139 |
?>
|
140 |
<tr class="rowCount <?php print"$c";?>">
|
141 |
+
<td><input type="hidden" name="attributes[<?php print "$c";?>][rowCount]" value="<?php print "$c";?>">
|
142 |
+
|
143 |
+
<?php
|
144 |
+
if ($row_v['feed_name'] == "g:item_group_id"){
|
145 |
+
?>
|
146 |
+
<input type="checkbox" name="record" class="checkbox-field" title="it is not allowed to remove the item_group_id field mapping" disabled>
|
147 |
+
<?php
|
148 |
+
} else {
|
149 |
+
?>
|
150 |
+
<input type="checkbox" name="record" class="checkbox-field">
|
151 |
+
<?php
|
152 |
+
}
|
153 |
+
?>
|
154 |
+
|
155 |
+
</td>
|
156 |
<td>
|
157 |
<select name="attributes[<?php print"$c"; ?>][attribute]" class="select-field">
|
158 |
<?php
|
225 |
}
|
226 |
?>
|
227 |
<tr class="rowCount <?php print "$attribute_key";?>">
|
228 |
+
<td><input type="hidden" name="attributes[<?php print "$attribute_key";?>][rowCount]" value="<?php print "$attribute_key";?>">
|
229 |
+
<?php
|
230 |
+
if ($attribute_array['attribute'] == "g:item_group_id"){
|
231 |
+
?>
|
232 |
+
<input type="checkbox" name="record" class="checkbox-field" title="it is not allowed to remove the item_group_id field mapping" disabled>
|
233 |
+
<?php
|
234 |
+
} else {
|
235 |
+
?>
|
236 |
+
<input type="checkbox" name="record" class="checkbox-field">
|
237 |
+
<?php
|
238 |
+
}
|
239 |
+
?>
|
240 |
+
</td>
|
241 |
<td>
|
242 |
<select name="attributes[<?php print"$attribute_key"; ?>][attribute]" class="select-field">
|
243 |
<?php
|
pages/admin/woosea-generate-feed-step-9.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Change default footer text, asking to review our plugin
|
4 |
+
**/
|
5 |
+
function my_footer_text($default) {
|
6 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro' );
|
7 |
+
}
|
8 |
+
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
+
$add_manipulation_support = get_option ('add_manipulation_support');
|
10 |
+
$host = $_SERVER['HTTP_HOST'];
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Create notification object
|
14 |
+
*/
|
15 |
+
$notifications_obj = new WooSEA_Get_Admin_Notifications;
|
16 |
+
$notifications_box = $notifications_obj->get_admin_notifications ( '15', 'false' );
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Create product attribute object
|
20 |
+
*/
|
21 |
+
$attributes_obj = new WooSEA_Attributes;
|
22 |
+
$attributes = $attributes_obj->get_product_attributes();
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Update or get project configuration
|
26 |
+
*/
|
27 |
+
if (array_key_exists('project_hash', $_GET)){
|
28 |
+
$project = WooSEA_Update_Project::get_project_data(sanitize_text_field($_GET['project_hash']));
|
29 |
+
$channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_GET['channel_hash']));
|
30 |
+
$count_rules = 0;
|
31 |
+
if(isset($project['field_manipulation'])){
|
32 |
+
$count_rules = count($project['field_manipulation']);
|
33 |
+
}
|
34 |
+
$manage_project = "yes";
|
35 |
+
} else {
|
36 |
+
$project = WooSEA_Update_Project::update_project($_POST);
|
37 |
+
$channel_data = WooSEA_Update_Project::get_channel_data(sanitize_text_field($_POST['channel_hash']));
|
38 |
+
$count_rules = 0;
|
39 |
+
}
|
40 |
+
?>
|
41 |
+
<div class="wrap">
|
42 |
+
<div class="woo-product-feed-pro-form-style-2">
|
43 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Product data manipulation','woo-product-feed-pro' );?></div>
|
44 |
+
|
45 |
+
<div class="<?php _e($notifications_box['message_type']); ?>">
|
46 |
+
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
47 |
+
</div>
|
48 |
+
<form id="fieldmanipulation" method="post">
|
49 |
+
|
50 |
+
<table class="woo-product-feed-pro-table" id="woosea-ajax-table" border="1">
|
51 |
+
<thead>
|
52 |
+
<tr>
|
53 |
+
<th></th>
|
54 |
+
<th><?php _e( 'Product type','woo-product-feed-pro' );?></th>
|
55 |
+
<th><?php _e( 'Field','woo-product-feed-pro' );?></th>
|
56 |
+
<th><?php _e( 'Becomes','woo-product-feed-pro' );?></th>
|
57 |
+
<th></th>
|
58 |
+
</tr>
|
59 |
+
</thead>
|
60 |
+
|
61 |
+
<tbody class="woo-product-feed-pro-body">
|
62 |
+
<?php
|
63 |
+
if(isset($project['field_manipulation'])){
|
64 |
+
|
65 |
+
$product_types = array(
|
66 |
+
"all" => "Simple and variable",
|
67 |
+
"simple" => "Simple",
|
68 |
+
"variable" => "Variable"
|
69 |
+
);
|
70 |
+
|
71 |
+
foreach ($project['field_manipulation'] as $manipulation_key => $manipulation_array){
|
72 |
+
?>
|
73 |
+
<tr class="rowCount">
|
74 |
+
<td valign="top">
|
75 |
+
<input type="hidden" name="field_manipulation[<?php print "$manipulation_key";?>][rowCount]" value="<?php print "$manipulation_key";?>"><input type="checkbox" name="record" class="checkbox-field">
|
76 |
+
</td>
|
77 |
+
<td valign="top">
|
78 |
+
<select name="field_manipulation[<?php print "$manipulation_key";?>][product_type]" class="select-field">
|
79 |
+
<?php
|
80 |
+
foreach ($product_types as $k => $v){
|
81 |
+
if (isset($project['field_manipulation'][$manipulation_key]['product_type']) AND ($project['field_manipulation'][$manipulation_key]['product_type'] == $k)){
|
82 |
+
print "<option value=\"$k\" selected>$v</option>";
|
83 |
+
} else {
|
84 |
+
print "<option value=\"$k\">$v</option>";
|
85 |
+
}
|
86 |
+
}
|
87 |
+
?>
|
88 |
+
</select>
|
89 |
+
</td>
|
90 |
+
<td valign="top">
|
91 |
+
<select name="field_manipulation[<?php print "$manipulation_key";?>][attribute]" class="select-field">
|
92 |
+
<?php
|
93 |
+
foreach ($attributes as $k => $v){
|
94 |
+
if (isset($project['field_manipulation'][$manipulation_key]['attribute']) AND ($project['field_manipulation'][$manipulation_key]['attribute'] == $k)){
|
95 |
+
print "<option value=\"$k\" selected>$v</option>";
|
96 |
+
} else {
|
97 |
+
print "<option value=\"$k\">$v</option>";
|
98 |
+
}
|
99 |
+
}
|
100 |
+
?>
|
101 |
+
</select>
|
102 |
+
</td>
|
103 |
+
<td valign="top" class="becomes_fields_<?php print "$manipulation_key";?>">
|
104 |
+
<?php
|
105 |
+
foreach ($project['field_manipulation'][$manipulation_key]['becomes'] as $k => $v){
|
106 |
+
print "<select name=\"field_manipulation[$manipulation_key][becomes][$k][attribute]\" class=\"select_field\">";
|
107 |
+
foreach ($attributes as $ak => $av){
|
108 |
+
if (isset($project['field_manipulation'][$manipulation_key]['becomes'][$k]['attribute']) AND ($project['field_manipulation'][$manipulation_key]['becomes'][$k]['attribute'] == $ak)){
|
109 |
+
print "<option value=\"$ak\" selected>$av</option>";
|
110 |
+
} else {
|
111 |
+
print "<option value=\"$ak\">$av</option>";
|
112 |
+
}
|
113 |
+
}
|
114 |
+
print "</select>";
|
115 |
+
print "</br>";
|
116 |
+
}
|
117 |
+
?>
|
118 |
+
</td>
|
119 |
+
<td>
|
120 |
+
<span class="dashicons dashicons-plus field_extra field_manipulation_extra_<?php print"$manipulation_key";?>" style="display: inline-block;" title="Add an attribute to this field"></span>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
<?php
|
124 |
+
}
|
125 |
+
}
|
126 |
+
?>
|
127 |
+
</tbody>
|
128 |
+
|
129 |
+
<tbody>
|
130 |
+
|
131 |
+
<tr class="rules-buttons">
|
132 |
+
<td colspan="8">
|
133 |
+
<input type="hidden" id="channel_hash" name="channel_hash" value="<?php print "$project[channel_hash]";?>">
|
134 |
+
<input type="hidden" name="project_hash" value="<?php print "$project[project_hash]";?>">
|
135 |
+
<input type="hidden" name="woosea_page" value="field_manipulation">
|
136 |
+
<input type="hidden" name="step" value="100">
|
137 |
+
<input type="button" class="delete-row" value="- Delete"> <input type="button" class="add-field-manipulation" value="+ Add field manipulation"> <input type="submit" id="savebutton" value="Save">
|
138 |
+
</td>
|
139 |
+
</tr>
|
140 |
+
</tbody>
|
141 |
+
</table>
|
142 |
+
</form>
|
143 |
+
</div>
|
144 |
+
</div>
|
pages/admin/woosea-key.php
CHANGED
@@ -109,7 +109,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
109 |
<ul>
|
110 |
<li><strong><a href="https://adtribes.io/support/" target="_blank">Frequently Asked Questions</a></strong></li>
|
111 |
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank">YouTube tutorials</a></strong></li>
|
112 |
-
<li><strong><a href="https://adtribes.io/
|
113 |
</ul>
|
114 |
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank">the support forum</a></strong> and we'll make sure your product feeds will be up-and-running within no-time.
|
115 |
</td>
|
@@ -118,7 +118,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
118 |
|
119 |
<table class="woo-product-feed-pro-table">
|
120 |
<tr>
|
121 |
-
<td><strong>Our latest
|
122 |
</tr>
|
123 |
<tr>
|
124 |
<td>
|
109 |
<ul>
|
110 |
<li><strong><a href="https://adtribes.io/support/" target="_blank">Frequently Asked Questions</a></strong></li>
|
111 |
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank">YouTube tutorials</a></strong></li>
|
112 |
+
<li><strong><a href="https://adtribes.io/tutorials/" target="_blank">Tutorials</a></strong></li>
|
113 |
</ul>
|
114 |
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank">the support forum</a></strong> and we'll make sure your product feeds will be up-and-running within no-time.
|
115 |
</td>
|
118 |
|
119 |
<table class="woo-product-feed-pro-table">
|
120 |
<tr>
|
121 |
+
<td><strong>Our latest tutorials</strong></td>
|
122 |
</tr>
|
123 |
<tr>
|
124 |
<td>
|
pages/admin/woosea-manage-feed.php
CHANGED
@@ -7,6 +7,7 @@ $published_single = $count_single->publish;
|
|
7 |
$published_variation = $count_variation->publish;
|
8 |
$published_products = $published_single+$published_variation;
|
9 |
$host = $_SERVER['HTTP_HOST'];
|
|
|
10 |
|
11 |
$product_numbers = array (
|
12 |
"Single products" => $published_single,
|
@@ -33,7 +34,7 @@ $order_rows = $wpdb->get_results("SELECT * FROM $table_name", ARRAY_A);
|
|
33 |
* Change default footer text, asking to review our plugin
|
34 |
**/
|
35 |
function my_footer_text($default) {
|
36 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
37 |
}
|
38 |
add_filter('admin_footer_text', 'my_footer_text');
|
39 |
|
@@ -77,10 +78,10 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
77 |
if(sanitize_text_field($_GET['debug']) == "true"){
|
78 |
$external_debug_file = $notifications_obj->woosea_debug_informations ($versions, $product_numbers, $order_rows, $cron_projects);
|
79 |
?>
|
80 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
81 |
<div class="notice notice-error is-dismissible">
|
82 |
<p>
|
83 |
-
Thank you for taking the time to help us find bugs in our plugin. It is greatly appreciated by us and your feedback will help all current and future users of this plugin. Could you please copy / paste the debug URL in the box below and send it to <a href="mailto:support@adtribes.io">support@adtribes.io</a> so we can analyse how your feed projects are configured and discover potential problems
|
84 |
<?php
|
85 |
print "<strong>Debug file:</strong><br/><a href=\"$external_debug_file\" target=\"_blank\">$external_debug_file</a>";
|
86 |
?>
|
@@ -93,13 +94,14 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
93 |
?>
|
94 |
<div class="notice notice-info is-dismissible">
|
95 |
<p>
|
96 |
-
<strong
|
97 |
-
<span class="dashicons dashicons-yes"></span
|
98 |
-
<span class="dashicons dashicons-yes"></span
|
99 |
-
<span class="dashicons dashicons-yes"></span
|
100 |
-
<span class="dashicons dashicons-yes"></span
|
101 |
-
<span class="dashicons dashicons-yes"></span
|
102 |
-
|
|
|
103 |
</p>
|
104 |
</div>
|
105 |
<?php
|
@@ -107,17 +109,17 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
107 |
}
|
108 |
?>
|
109 |
|
110 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
111 |
<div class="woo-product-feed-pro-table-wrapper">
|
112 |
<div class="woo-product-feed-pro-table-left">
|
113 |
|
114 |
<table id="woosea_main_table" class="woo-product-feed-pro-table">
|
115 |
<tr>
|
116 |
-
<td><strong
|
117 |
-
<td><strong
|
118 |
-
<td><strong
|
119 |
-
<td><strong
|
120 |
-
<td><strong
|
121 |
<td></td>
|
122 |
</tr>
|
123 |
|
@@ -194,21 +196,29 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
194 |
?>
|
195 |
<tr>
|
196 |
<td>
|
197 |
-
<strong
|
198 |
-
<span class="dashicons dashicons-arrow-right" style="display: inline-block;"></span> <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=0&project_hash=<?php print "$val[project_hash]";?>&channel_hash=<?php print "$val[channel_hash]";?>"
|
199 |
<?php
|
200 |
if ($val['fields'] == "standard"){
|
201 |
-
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=2&project_hash=$val[project_hash]&channel_hash=$val[channel_hash]\">Attribute selection</a></br/>";
|
202 |
} else {
|
203 |
-
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=7&project_hash=$val[project_hash]&channel_hash=$val[channel_hash]\">Field mapping</a><br/>";
|
204 |
}
|
205 |
|
206 |
if ($val['taxonomy'] != "none"){
|
207 |
-
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=1&project_hash=$val[project_hash]&channel_hash=$val[channel_hash]\">Category mapping</a><br/>";
|
208 |
}
|
209 |
?>
|
210 |
-
|
211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
</td>
|
213 |
</tr>
|
214 |
<?php
|
@@ -216,10 +226,10 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
216 |
?>
|
217 |
<tr>
|
218 |
<td>
|
219 |
-
<strong
|
220 |
<?php
|
221 |
if (($val['active'] == "true") AND ($val['running'] != "not run yet")){
|
222 |
-
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> $val[external_file]";
|
223 |
} else {
|
224 |
print "<span class=\"dashicons dashicons-warning\"></span> Whoops, there is no active product feed for this project as the project has been disabled or did not run yet.";
|
225 |
}
|
@@ -239,7 +249,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
239 |
} else {
|
240 |
?>
|
241 |
<tr>
|
242 |
-
<td colspan="6"><br/><span class="dashicons dashicons-warning"></span> You didn't configured a product feed yet, <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php"
|
243 |
</tr>
|
244 |
<?php
|
245 |
}
|
@@ -252,21 +262,21 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
252 |
?>
|
253 |
<table class="woo-product-feed-pro-table">
|
254 |
<tr>
|
255 |
-
<td><strong
|
256 |
</tr>
|
257 |
<tr>
|
258 |
<td>
|
259 |
-
Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!
|
260 |
<ul>
|
261 |
-
<li><strong>1.</strong> Priority support: get your feeds live faster
|
262 |
-
<li><strong>2.</strong> More products approved by Google
|
263 |
-
<li><strong>3.</strong> Add GTIN, brand and more fields to your store
|
264 |
-
<li><strong>4.</strong> Exclude individual products from your feeds
|
265 |
-
<li><strong>5.</strong> WPML support
|
266 |
-
<li><strong>6.</strong> Aelia currency switcher support
|
267 |
</ul>
|
268 |
<strong>
|
269 |
-
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=why-upgrade-box" target="_blank"
|
270 |
</strong>
|
271 |
</td>
|
272 |
</tr>
|
@@ -277,37 +287,40 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
277 |
|
278 |
<table class="woo-product-feed-pro-table">
|
279 |
<tr>
|
280 |
-
<td><strong
|
281 |
</tr>
|
282 |
<tr>
|
283 |
<td>
|
284 |
-
Need assistance? Check out our:
|
285 |
<ul>
|
286 |
-
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=faq" target="_blank"
|
287 |
-
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"
|
288 |
-
<li><strong><a href="https://adtribes.io/
|
289 |
</ul>
|
290 |
-
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"
|
291 |
</td>
|
292 |
</tr>
|
293 |
</table><br/>
|
294 |
|
295 |
<table class="woo-product-feed-pro-table">
|
296 |
<tr>
|
297 |
-
<td><strong
|
298 |
</tr>
|
299 |
<tr>
|
300 |
<td>
|
301 |
<ul>
|
302 |
-
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=first shopping feed" target="_blank"
|
303 |
-
|
304 |
-
<li><strong>
|
305 |
-
|
306 |
-
<li><strong>
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
|
|
|
|
|
|
311 |
</ul>
|
312 |
</td>
|
313 |
</tr>
|
@@ -315,11 +328,18 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
315 |
|
316 |
<table class="woo-product-feed-pro-table">
|
317 |
<tr>
|
318 |
-
<td><strong
|
319 |
</tr>
|
320 |
<tr>
|
321 |
<td>
|
322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
</td>
|
324 |
</tr>
|
325 |
</table>
|
7 |
$published_variation = $count_variation->publish;
|
8 |
$published_products = $published_single+$published_variation;
|
9 |
$host = $_SERVER['HTTP_HOST'];
|
10 |
+
$add_manipulation_support = get_option ('add_manipulation_support');
|
11 |
|
12 |
$product_numbers = array (
|
13 |
"Single products" => $published_single,
|
34 |
* Change default footer text, asking to review our plugin
|
35 |
**/
|
36 |
function my_footer_text($default) {
|
37 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro');
|
38 |
}
|
39 |
add_filter('admin_footer_text', 'my_footer_text');
|
40 |
|
78 |
if(sanitize_text_field($_GET['debug']) == "true"){
|
79 |
$external_debug_file = $notifications_obj->woosea_debug_informations ($versions, $product_numbers, $order_rows, $cron_projects);
|
80 |
?>
|
81 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Debugging mode', 'woo-product-feed-pro' );?></div>
|
82 |
<div class="notice notice-error is-dismissible">
|
83 |
<p>
|
84 |
+
<?php _e( 'Thank you for taking the time to help us find bugs in our plugin. It is greatly appreciated by us and your feedback will help all current and future users of this plugin. Could you please copy / paste the debug URL in the box below and send it to <a href="mailto:support@adtribes.io">support@adtribes.io</a> so we can analyse how your feed projects are configured and discover potential problems.','woo-product-feed-pro' );?><br/><br/>
|
85 |
<?php
|
86 |
print "<strong>Debug file:</strong><br/><a href=\"$external_debug_file\" target=\"_blank\">$external_debug_file</a>";
|
87 |
?>
|
94 |
?>
|
95 |
<div class="notice notice-info is-dismissible">
|
96 |
<p>
|
97 |
+
<strong><?php _e( 'Would you like to get more out of your product feeds? Upgrade to the Elite version of the plugin and you will get:', 'woo-product-feed-pro' );?></strong><br/></br/>
|
98 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'Priority support - we will help you to get your product feed(s) up-and-running;', 'woo-product-feed-pro' );?><br/>
|
99 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'GTIN, Brand, MPN, EAN, Condition and more fields for your product feeds', 'woo-product-feed-pro' );?> [<a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=adding%20fields" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
100 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'Enhanched structured data on your product pages: more products approved in your Google Merchant Center', 'woo-product-feed-pro' );?> [<a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=structured%20data%20bug" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
101 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'Advanced product data manipulation','woo-product-feed-pro' );?> [<a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=product%20data%20manipulation" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
102 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'WPML support - including their currency switcher','woo-product-feed-pro' );?> [<a href="https://adtribes.io/wpml-support/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=wpml%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/>
|
103 |
+
<span class="dashicons dashicons-yes"></span><?php _e( 'Aelia currency switcher support','woo-product-feed-pro' );?> [<a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=oplader.org&utm_medium=manage-feed&utm_campaign=aelia%20support" target="_blank"><?php _e( 'Read more','woo-product-feed-pro' );?></a>];<br/><br/>
|
104 |
+
<?php _e( 'Upgrade to the','woo-product-feed-pro' );?> <a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_content=notification" target="_blank"><?php _e( 'Elite version of our plugin</a> to unlock these features.','woo-product-feed-pro' );?>
|
105 |
</p>
|
106 |
</div>
|
107 |
<?php
|
109 |
}
|
110 |
?>
|
111 |
|
112 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Manage feeds','woo-product-feed-pro' );?></div>
|
113 |
<div class="woo-product-feed-pro-table-wrapper">
|
114 |
<div class="woo-product-feed-pro-table-left">
|
115 |
|
116 |
<table id="woosea_main_table" class="woo-product-feed-pro-table">
|
117 |
<tr>
|
118 |
+
<td><strong><?php _e( 'Active','woo-product-feed-pro' );?></strong></td>
|
119 |
+
<td><strong><?php _e( 'Project name and channel','woo-product-feed-pro' );?></strong></td>
|
120 |
+
<td><strong><?php _e( 'Format','woo-product-feed-pro' );?></strong></td>
|
121 |
+
<td><strong><?php _e( 'Refresh interval','woo-product-feed-pro' );?></strong></td>
|
122 |
+
<td><strong><?php _e( 'Status','woo-product-feed-pro' );?></strong></td>
|
123 |
<td></td>
|
124 |
</tr>
|
125 |
|
196 |
?>
|
197 |
<tr>
|
198 |
<td>
|
199 |
+
<strong><?php _e( 'Change settings','woo-product-feed-pro' );?></strong><br/>
|
200 |
+
<span class="dashicons dashicons-arrow-right" style="display: inline-block;"></span> <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=0&project_hash=<?php print "$val[project_hash]";?>&channel_hash=<?php print "$val[channel_hash]";?>"><?php _e( 'General feed settings','woo-product-feed-pro' );?></a><br/>
|
201 |
<?php
|
202 |
if ($val['fields'] == "standard"){
|
203 |
+
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=2&project_hash=$val[project_hash]&channel_hash=$val[channel_hash]\">"; _e( 'Attribute selection','woo-product-feed-pro' ); print"</a></br/>";
|
204 |
} else {
|
205 |
+
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=7&project_hash=$val[project_hash]&channel_hash=$val[channel_hash]\">"; _e( 'Field mapping','woo-product-feed-pro' ); print"</a><br/>";
|
206 |
}
|
207 |
|
208 |
if ($val['taxonomy'] != "none"){
|
209 |
+
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=1&project_hash=$val[project_hash]&channel_hash=$val[channel_hash]\">"; _e( 'Category mapping','woo-product-feed-pro' ); print"</a><br/>";
|
210 |
}
|
211 |
?>
|
212 |
+
|
213 |
+
<?php
|
214 |
+
if ((isset($add_manipulation_support)) AND ($add_manipulation_support == "yes")){
|
215 |
+
?>
|
216 |
+
<span class="dashicons dashicons-arrow-right" style="display: inline-block;"></span> <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=9&project_hash=<?php print "$val[project_hash]";?>&channel_hash=<?php print "$val[channel_hash]";?>"><?php _e( 'Product data manipulation','woo-product-feed-pro');?></a><br/>
|
217 |
+
<?php
|
218 |
+
}
|
219 |
+
?>
|
220 |
+
<span class="dashicons dashicons-arrow-right" style="display: inline-block;"></span> <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=4&project_hash=<?php print "$val[project_hash]";?>&channel_hash=<?php print "$val[channel_hash]";?>"><?php _e( 'Feed filters and rules','woo-product-feed-pro' );?></a><br/>
|
221 |
+
<span class="dashicons dashicons-arrow-right" style="display: inline-block;"></span> <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php&action=edit_project&step=5&project_hash=<?php print "$val[project_hash]";?>&channel_hash=<?php print "$val[channel_hash]";?>"><?php _e( 'Google Analytics settings' );?></a><br/>
|
222 |
</td>
|
223 |
</tr>
|
224 |
<?php
|
226 |
?>
|
227 |
<tr>
|
228 |
<td>
|
229 |
+
<strong><?php _e( 'Feed URL','woo-product-feed-pro' );?></strong><br/>
|
230 |
<?php
|
231 |
if (($val['active'] == "true") AND ($val['running'] != "not run yet")){
|
232 |
+
print "<span class=\"dashicons dashicons-arrow-right\" style=\"display: inline-block;\"></span> <a href=\"$val[external_file]\" target=\"_blank\">$val[external_file]</a>";
|
233 |
} else {
|
234 |
print "<span class=\"dashicons dashicons-warning\"></span> Whoops, there is no active product feed for this project as the project has been disabled or did not run yet.";
|
235 |
}
|
249 |
} else {
|
250 |
?>
|
251 |
<tr>
|
252 |
+
<td colspan="6"><br/><span class="dashicons dashicons-warning"></span> <?php _e( 'You didn\'t configured a product feed yet','woo-product-feed-pro' );?>, <a href="admin.php?page=woo-product-feed-pro%2Fwoocommerce-sea.php"><?php _e( 'please create one first</a> or read our tutorial on','woo-product-feed-pro' );?> <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=first shopping feed" target="_blank"><?php _e( 'how to set up your very first Google Shopping product feed','woo-product-feed-pro' );?></a>.<br/><br/></td>
|
253 |
</tr>
|
254 |
<?php
|
255 |
}
|
262 |
?>
|
263 |
<table class="woo-product-feed-pro-table">
|
264 |
<tr>
|
265 |
+
<td><strong><?php _e( 'Why upgrade to Elite?','woo-product-feed-pro' );?></strong></td>
|
266 |
</tr>
|
267 |
<tr>
|
268 |
<td>
|
269 |
+
<?php _e ('Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!','woo-product-feed-pro' );?>
|
270 |
<ul>
|
271 |
+
<li><strong>1.</strong> <?php _e( 'Priority support: get your feeds live faster','woo-product-feed-pro' );?></li>
|
272 |
+
<li><strong>2.</strong> <?php _e( 'More products approved by Google','woo-product-feed-pro' );?></li>
|
273 |
+
<li><strong>3.</strong> <?php _e( 'Add GTIN, brand and more fields to your store','woo-product-feed-pro' );?></li>
|
274 |
+
<li><strong>4.</strong> <?php _e( 'Exclude individual products from your feeds','woo-product-feed-pro' );?></li>
|
275 |
+
<li><strong>5.</strong> <?php _e( 'WPML support','woo-product-feed-pro' );?></li>
|
276 |
+
<li><strong>6.</strong> <?php _e( 'Aelia currency switcher support','woo-product-feed-pro' );?></li>
|
277 |
</ul>
|
278 |
<strong>
|
279 |
+
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=why-upgrade-box" target="_blank"><?php _e( 'Upgrade to Elite here!','woo-product-feed-pro' );?></a>
|
280 |
</strong>
|
281 |
</td>
|
282 |
</tr>
|
287 |
|
288 |
<table class="woo-product-feed-pro-table">
|
289 |
<tr>
|
290 |
+
<td><strong><?php _e( 'We’ve got you covered!','woo-product-feed-pro' );?></strong></td>
|
291 |
</tr>
|
292 |
<tr>
|
293 |
<td>
|
294 |
+
<?php _e( 'Need assistance? Check out our:','woo-product-feed-pro' );?>
|
295 |
<ul>
|
296 |
+
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=faq" target="_blank"><?php _e( 'Frequently Asked Questions','woo-product-feed-pro' );?></a></strong></li>
|
297 |
+
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"><?php _e( 'YouTube tutorials','woo-product-feed-pro' );?></a></strong></li>
|
298 |
+
<li><strong><a href="https://adtribes.io/tutorials/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=tutorials" target="_blank"><?php _e( 'Tutorials','woo-product-feed-pro' );?></a></strong></li>
|
299 |
</ul>
|
300 |
+
<?php _e( 'Or just reach out to us at','woo-product-feed-pro' );?> <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"><?php _e( 'our Wordpress forum','woo-product-feed-pro' );?></a></strong> <?php _e( 'and we will make sure your product feeds will be up-and-running within no-time.','woo-product-feed-pro' );?>
|
301 |
</td>
|
302 |
</tr>
|
303 |
</table><br/>
|
304 |
|
305 |
<table class="woo-product-feed-pro-table">
|
306 |
<tr>
|
307 |
+
<td><strong><?php _e( 'Our latest tutorials','woo-product-feed-pro' );?></strong></td>
|
308 |
</tr>
|
309 |
<tr>
|
310 |
<td>
|
311 |
<ul>
|
312 |
+
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=first shopping feed" target="_blank"><?php _e( 'Create a Google Shopping feed','woo-product-feed-pro' );?></a></strong></li>
|
313 |
+
|
314 |
+
<li><strong>2. <a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=product_data_manipulation" target="_blank"><?php _e( 'Product data manipulation','woo-product-feed-pro' );?></a></strong></li>
|
315 |
+
|
316 |
+
<li><strong>3. <a href="https://adtribes.io/how-to-create-filters-for-your-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=how to create filters" target="_blank"><?php _e( 'How to create filters for your product feed','woo-product-feed-pro' );?></a></strong></li>
|
317 |
+
<li><strong>4. <a href="https://adtribes.io/how-to-create-rules/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=how to create rules" target="_blank"><?php _e( 'How to set rules for your product feed','woo-product-feed-pro' );?></a></strong></li>
|
318 |
+
<li><strong>5. <a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=adding fields" target="_blank"><?php _e( 'Adding GTIN, Brand, MPN and more','woo-product-feed-pro' );?></a></strong></li>
|
319 |
+
<li><strong>6. <a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=structured data bug" target="_blank"><?php _e( 'WooCommerce structured data markup bug','woo-product-feed-pro' );?></a></strong></li>
|
320 |
+
<li><strong>7. <a href="https://adtribes.io/wpml-support/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=wpml support" target="_blank"><?php _e( 'Enable WPML support','woo-product-feed-pro' );?></a></strong></li>
|
321 |
+
<li><strong>8. <a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=aelia support" target="_blank"><?php _e( 'Enable Aelia currency switcher support','woo-product-feed-pro' );?></a></strong></li>
|
322 |
+
<li><strong>9. <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=feed stuck" target="_blank"><?php _e( 'Help, my feed is stuck!','woo-product-feed-pro' );?></a></strong></li>
|
323 |
+
<li><strong>10. <a href="https://adtribes.io/help-i-have-none-or-less-products-in-my-product-feed-than-expected/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=too few products" target="_blank"><?php _e( 'Help, my feed has no or too few products!','woo-product-feed-pro');?></a></strong></li>
|
324 |
</ul>
|
325 |
</td>
|
326 |
</tr>
|
328 |
|
329 |
<table class="woo-product-feed-pro-table">
|
330 |
<tr>
|
331 |
+
<td><strong><?php _e( 'WooCommerce product numbers','woo-product-feed-pro' );?></strong></td>
|
332 |
</tr>
|
333 |
<tr>
|
334 |
<td>
|
335 |
+
<?php
|
336 |
+
printf(
|
337 |
+
__( 'You currently have %1$s published products on your website out of which %2$s are single products and %3$s and variable products','woo-product-feed-pro' ),
|
338 |
+
$published_products,
|
339 |
+
$published_single,
|
340 |
+
$published_variation
|
341 |
+
);
|
342 |
+
?>
|
343 |
</td>
|
344 |
</tr>
|
345 |
</table>
|
pages/admin/woosea-manage-settings.php
CHANGED
@@ -60,7 +60,7 @@ if(array_key_exists('notice', $license_information)){
|
|
60 |
* Change default footer text, asking to review our plugin
|
61 |
**/
|
62 |
function my_footer_text($default) {
|
63 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
64 |
}
|
65 |
add_filter('admin_footer_text', 'my_footer_text');
|
66 |
|
@@ -68,21 +68,21 @@ add_filter('admin_footer_text', 'my_footer_text');
|
|
68 |
//we check if the page is visited by click on the tabs or on the menu button.
|
69 |
//then we get the active tab.
|
70 |
$active_tab = "woosea_manage_settings";
|
71 |
-
$header_text =
|
72 |
if(isset($_GET["tab"])) {
|
73 |
if($_GET["tab"] == "woosea_manage_settings"){
|
74 |
$active_tab = "woosea_manage_settings";
|
75 |
-
$header_text =
|
76 |
} elseif ($_GET["tab"] == "woosea_system_check"){
|
77 |
$active_tab = "woosea_system_check";
|
78 |
-
$header_text =
|
79 |
} elseif ($_GET["tab"] == "woosea_license_check"){
|
80 |
$active_tab = "woosea_license_check";
|
81 |
-
$header_text =
|
82 |
} else {
|
83 |
$active_tab = "woosea_manage_attributes";
|
84 |
-
$header_text =
|
85 |
-
$license_information['message'] =
|
86 |
}
|
87 |
}
|
88 |
?>
|
@@ -109,14 +109,13 @@ if(isset($_GET["tab"])) {
|
|
109 |
}
|
110 |
?>
|
111 |
|
112 |
-
|
113 |
<!-- wordpress provides the styling for tabs. -->
|
114 |
<h2 class="nav-tab-wrapper">
|
115 |
<!-- when tab buttons are clicked we jump back to the same page but with a new parameter that represents the clicked tab. accordingly we make it active -->
|
116 |
-
<a href="?page=woosea_manage_settings&tab=woosea_manage_settings" class="nav-tab <?php if($active_tab == 'woosea_manage_settings'){echo 'nav-tab-active';} ?> "><?php _e('Plugin settings', '
|
117 |
-
<a href="?page=woosea_manage_settings&tab=woosea_manage_attributes" class="nav-tab <?php if($active_tab == 'woosea_manage_attributes'){echo 'nav-tab-active';} ?>"><?php _e('Attribute settings', '
|
118 |
-
<a href="?page=woosea_manage_settings&tab=woosea_system_check" class="nav-tab <?php if($active_tab == 'woosea_system_check'){echo 'nav-tab-active';} ?>"><?php _e('Plugin systems check', '
|
119 |
-
<a href="?page=woosea_manage_settings&tab=woosea_license_check" class="nav-tab <?php if($active_tab == 'woosea_license_check'){echo 'nav-tab-active';} ?>"><?php _e('License', '
|
120 |
</h2>
|
121 |
|
122 |
<div class="woo-product-feed-pro-table-wrapper">
|
@@ -126,13 +125,13 @@ if(isset($_GET["tab"])) {
|
|
126 |
?>
|
127 |
|
128 |
<table class="woo-product-feed-pro-table">
|
129 |
-
<tr><td><strong
|
130 |
|
131 |
<form action="" method="post">
|
132 |
<tr class="<?php print"$elite_disable";?>" id="json_option">
|
133 |
<td>
|
134 |
-
<span
|
135 |
-
This option will fix WooCommerce's (JSON-LD) structured data bug and add extra structured data elements to your pages (<a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_content=structured data bug" target="_blank"
|
136 |
</td>
|
137 |
<td>
|
138 |
<label class="woo-product-feed-pro-switch">
|
@@ -151,7 +150,7 @@ if(isset($_GET["tab"])) {
|
|
151 |
|
152 |
<tr class="<?php print"$elite_disable";?>" id="structured_vat_option">
|
153 |
<td>
|
154 |
-
<span
|
155 |
</td>
|
156 |
<td>
|
157 |
<label class="woo-product-feed-pro-switch">
|
@@ -170,7 +169,7 @@ if(isset($_GET["tab"])) {
|
|
170 |
|
171 |
<tr class="<?php print"$elite_disable";?>" id="identifier_option">
|
172 |
<td>
|
173 |
-
<span
|
174 |
</td>
|
175 |
<td>
|
176 |
<label class="woo-product-feed-pro-switch">
|
@@ -186,10 +185,29 @@ if(isset($_GET["tab"])) {
|
|
186 |
</label>
|
187 |
</td>
|
188 |
</tr>
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
<tr class="<?php print"$elite_disable";?>" id="wpml_option">
|
191 |
<td>
|
192 |
-
<span
|
193 |
</td>
|
194 |
<td>
|
195 |
<label class="woo-product-feed-pro-switch">
|
@@ -208,7 +226,7 @@ if(isset($_GET["tab"])) {
|
|
208 |
|
209 |
<tr class="<?php print"$elite_disable";?>" id="aelia_option">
|
210 |
<td>
|
211 |
-
<span
|
212 |
</td>
|
213 |
<td>
|
214 |
<label class="woo-product-feed-pro-switch">
|
@@ -226,7 +244,7 @@ if(isset($_GET["tab"])) {
|
|
226 |
</tr>
|
227 |
<tr>
|
228 |
<td>
|
229 |
-
<span
|
230 |
</td>
|
231 |
<td>
|
232 |
<label class="woo-product-feed-pro-switch">
|
@@ -243,9 +261,30 @@ if(isset($_GET["tab"])) {
|
|
243 |
</td>
|
244 |
</tr>
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
<tr id="remarketing">
|
247 |
<td>
|
248 |
-
<span
|
249 |
</td>
|
250 |
<td>
|
251 |
<label class="woo-product-feed-pro-switch">
|
@@ -276,7 +315,7 @@ if(isset($_GET["tab"])) {
|
|
276 |
<table class="woo-product-feed-pro-table">
|
277 |
<tr>
|
278 |
<td>
|
279 |
-
<span
|
280 |
</td>
|
281 |
<td>
|
282 |
<input type="text" class="input-field-large" id="license-email" name="license-email" value="<?php print "$license_information[license_email]";?>">
|
@@ -284,14 +323,14 @@ if(isset($_GET["tab"])) {
|
|
284 |
</tr>
|
285 |
<tr>
|
286 |
<td>
|
287 |
-
<span
|
288 |
</td>
|
289 |
<td>
|
290 |
<input type="text" class="input-field-large" id="license-key" name="license-key" value="<?php print "$license_information[license_key]";?>">
|
291 |
</td>
|
292 |
</tr>
|
293 |
<tr>
|
294 |
-
<td colspan="2"><i
|
295 |
</tr>
|
296 |
<tr>
|
297 |
<td colspan="2">
|
@@ -316,7 +355,7 @@ if(isset($_GET["tab"])) {
|
|
316 |
$upload_dir = wp_upload_dir();
|
317 |
$external_base = $upload_dir['basedir'];
|
318 |
$external_path = $external_base . "/woo-product-feed-pro/";
|
319 |
-
|
320 |
if (is_writable($external_path)) {
|
321 |
$directory_perm = "True";
|
322 |
} else {
|
@@ -414,21 +453,21 @@ GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
|
|
414 |
?>
|
415 |
<table class="woo-product-feed-pro-table">
|
416 |
<tr>
|
417 |
-
<td><strong
|
418 |
</tr>
|
419 |
<tr>
|
420 |
<td>
|
421 |
-
Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!
|
422 |
<ul>
|
423 |
-
<li><strong>1.</strong> Priority support: get your feeds live faster
|
424 |
-
<li><strong>2.</strong> More products approved by Google
|
425 |
-
<li><strong>3.</strong> Add GTIN, brand and more fields to your store
|
426 |
-
<li><strong>4.</strong> Exclude individual products from your feeds
|
427 |
-
<li><strong>5.</strong> WPML support
|
428 |
-
<li><strong>6.</strong> Aelia currency switcher support
|
429 |
</ul>
|
430 |
<strong>
|
431 |
-
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-settings&utm_campaign=why-upgrade-box" target="_blank"
|
432 |
</strong>
|
433 |
</td>
|
434 |
</tr>
|
@@ -439,37 +478,40 @@ GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
|
|
439 |
|
440 |
<table class="woo-product-feed-pro-table">
|
441 |
<tr>
|
442 |
-
<td><strong
|
443 |
</tr>
|
444 |
<tr>
|
445 |
<td>
|
446 |
-
Need assistance? Check out our
|
447 |
<ul>
|
448 |
-
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=manage-settings&utm_campaign=faq" target="_blank"
|
449 |
-
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"
|
450 |
-
<li><strong><a href="https://adtribes.io/
|
451 |
</ul>
|
452 |
-
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"
|
453 |
</td>
|
454 |
</tr>
|
455 |
</table><br/>
|
456 |
-
|
457 |
|
458 |
<table class="woo-product-feed-pro-table">
|
459 |
<tr>
|
460 |
-
<td><strong
|
461 |
</tr>
|
462 |
<tr>
|
463 |
<td>
|
464 |
<ul>
|
465 |
-
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=first shopping feed" target="_blank"
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
<li><strong>
|
470 |
-
<li><strong>
|
471 |
-
|
472 |
-
<li><strong>
|
|
|
|
|
|
|
|
|
473 |
</ul>
|
474 |
</td>
|
475 |
</tr>
|
60 |
* Change default footer text, asking to review our plugin
|
61 |
**/
|
62 |
function my_footer_text($default) {
|
63 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product-feed-pro' );
|
64 |
}
|
65 |
add_filter('admin_footer_text', 'my_footer_text');
|
66 |
|
68 |
//we check if the page is visited by click on the tabs or on the menu button.
|
69 |
//then we get the active tab.
|
70 |
$active_tab = "woosea_manage_settings";
|
71 |
+
$header_text = __( 'Plugin settings', 'woo-product-feed-pro' );
|
72 |
if(isset($_GET["tab"])) {
|
73 |
if($_GET["tab"] == "woosea_manage_settings"){
|
74 |
$active_tab = "woosea_manage_settings";
|
75 |
+
$header_text = __( 'Plugin settings', 'woo-product-feed-pro' );
|
76 |
} elseif ($_GET["tab"] == "woosea_system_check"){
|
77 |
$active_tab = "woosea_system_check";
|
78 |
+
$header_text = __( 'Plugin systems check', 'woo-product-feed-pro' );
|
79 |
} elseif ($_GET["tab"] == "woosea_license_check"){
|
80 |
$active_tab = "woosea_license_check";
|
81 |
+
$header_text = __( 'License', 'woo-product-feed-pro' );
|
82 |
} else {
|
83 |
$active_tab = "woosea_manage_attributes";
|
84 |
+
$header_text = __( 'Attribute settings', 'woo-product-feed-pro' );
|
85 |
+
$license_information['message'] = __( 'This plugin, by default, only shows a limit amount of custom attributes in the configuration and filter/rule drop-downs. We have done so for performance reasons. You can however add missing custom attributes by enabling them below. After enabling a custom attribute it shows in the drop-downs during configuration so you can use them for your product feeds.', 'woo-product-feed-pro' );
|
86 |
}
|
87 |
}
|
88 |
?>
|
109 |
}
|
110 |
?>
|
111 |
|
|
|
112 |
<!-- wordpress provides the styling for tabs. -->
|
113 |
<h2 class="nav-tab-wrapper">
|
114 |
<!-- when tab buttons are clicked we jump back to the same page but with a new parameter that represents the clicked tab. accordingly we make it active -->
|
115 |
+
<a href="?page=woosea_manage_settings&tab=woosea_manage_settings" class="nav-tab <?php if($active_tab == 'woosea_manage_settings'){echo 'nav-tab-active';} ?> "><?php _e('Plugin settings', 'woo-product-feed-pro'); ?></a>
|
116 |
+
<a href="?page=woosea_manage_settings&tab=woosea_manage_attributes" class="nav-tab <?php if($active_tab == 'woosea_manage_attributes'){echo 'nav-tab-active';} ?>"><?php _e('Attribute settings', 'woo-product-feed-pro'); ?></a>
|
117 |
+
<a href="?page=woosea_manage_settings&tab=woosea_system_check" class="nav-tab <?php if($active_tab == 'woosea_system_check'){echo 'nav-tab-active';} ?>"><?php _e('Plugin systems check', 'woo-product-feed-pro'); ?></a>
|
118 |
+
<a href="?page=woosea_manage_settings&tab=woosea_license_check" class="nav-tab <?php if($active_tab == 'woosea_license_check'){echo 'nav-tab-active';} ?>"><?php _e('License', 'woo-product-feed-pro'); ?></a>
|
119 |
</h2>
|
120 |
|
121 |
<div class="woo-product-feed-pro-table-wrapper">
|
125 |
?>
|
126 |
|
127 |
<table class="woo-product-feed-pro-table">
|
128 |
+
<tr><td><strong><?php _e( 'Plugin setting', 'woo-product-feed-pro' );?></strong></td><td><strong><?php _e( 'Off / On', 'woo-product-feed-pro' );?></strong></td></tr>
|
129 |
|
130 |
<form action="" method="post">
|
131 |
<tr class="<?php print"$elite_disable";?>" id="json_option">
|
132 |
<td>
|
133 |
+
<span><?php _e( 'Increase the number of products that will be approved in Google\'s Merchant Center:', 'woo-product-feed-pro' );?><br/>
|
134 |
+
<?php _e( 'This option will fix WooCommerce\'s (JSON-LD) structured data bug and add extra structured data elements to your pages.', 'woo-product-feed-pro' );?> (<a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_content=structured data bug" target="_blank"><?php _e( 'Read more about this', 'woo-product-feed-pro' );?>)</a></span>
|
135 |
</td>
|
136 |
<td>
|
137 |
<label class="woo-product-feed-pro-switch">
|
150 |
|
151 |
<tr class="<?php print"$elite_disable";?>" id="structured_vat_option">
|
152 |
<td>
|
153 |
+
<span><?php _e( 'Exclude TAX from structured data prices', 'woo-product-feed-pro' );?></span>
|
154 |
</td>
|
155 |
<td>
|
156 |
<label class="woo-product-feed-pro-switch">
|
169 |
|
170 |
<tr class="<?php print"$elite_disable";?>" id="identifier_option">
|
171 |
<td>
|
172 |
+
<span><?php _e( 'Add GTIN, MPN, UPC, EAN, Product condition, Optimised title, Installment, Unit measure and Brand attributes to your store:', 'woo-product-feed-pro' );?> (<a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_content=adding fields" target="_blank"><?php _e( 'Read more about this', 'woo-product-feed-pro' );?>)</a></span>
|
173 |
</td>
|
174 |
<td>
|
175 |
<label class="woo-product-feed-pro-switch">
|
185 |
</label>
|
186 |
</td>
|
187 |
</tr>
|
188 |
+
|
189 |
+
<tr class="<?php print"$elite_disable";?>" id="manipulation_option">
|
190 |
+
<td>
|
191 |
+
<span><?php _e( 'Enable Product data manipulation feature:', 'woo-product-feed-pro' );?> (<a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_content=wpml support" target="_blank"><?php _e( 'Read more about this', 'woo-product-feed-pro' );?>)</a></span>
|
192 |
+
</td>
|
193 |
+
<td>
|
194 |
+
<label class="woo-product-feed-pro-switch">
|
195 |
+
<?php
|
196 |
+
$add_manipulation_support = get_option ('add_manipulation_support');
|
197 |
+
if($add_manipulation_support == "yes"){
|
198 |
+
print "<input type=\"checkbox\" id=\"add_manipulation_support\" name=\"add_manipulation_support\" class=\"checkbox-field\" checked $elite_disable>";
|
199 |
+
} else {
|
200 |
+
print "<input type=\"checkbox\" id=\"add_manipulation_support\" name=\"add_manipulation_support\" class=\"checkbox-field\" $elite_disable>";
|
201 |
+
}
|
202 |
+
?>
|
203 |
+
<div class="woo-product-feed-pro-slider round"></div>
|
204 |
+
</label>
|
205 |
+
</td>
|
206 |
+
</tr>
|
207 |
+
|
208 |
<tr class="<?php print"$elite_disable";?>" id="wpml_option">
|
209 |
<td>
|
210 |
+
<span><?php _e( 'Enable WPML support:', 'woo-product-feed-pro');?> (<a href="https://adtribes.io/wpml-support/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_content=wpml support" target="_blank"><?php _e( 'Read more about this', 'woo-product-feed-pro');?>)</a></span>
|
211 |
</td>
|
212 |
<td>
|
213 |
<label class="woo-product-feed-pro-switch">
|
226 |
|
227 |
<tr class="<?php print"$elite_disable";?>" id="aelia_option">
|
228 |
<td>
|
229 |
+
<span><?php _e( 'Enable Aelia Currency Switcher support:', 'woo-product-feed-pro');?> (<a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_content=aelia support" target="_blank"><?php _e( 'Read more about this', 'woo-product-feed-pro'); ?>)</a></span>
|
230 |
</td>
|
231 |
<td>
|
232 |
<label class="woo-product-feed-pro-switch">
|
244 |
</tr>
|
245 |
<tr>
|
246 |
<td>
|
247 |
+
<span><?php _e( 'Use mother main image for variations', 'woo-product-feed-pro');?></span>
|
248 |
</td>
|
249 |
<td>
|
250 |
<label class="woo-product-feed-pro-switch">
|
261 |
</td>
|
262 |
</tr>
|
263 |
|
264 |
+
<tr>
|
265 |
+
<td>
|
266 |
+
<span><?php _e( 'Enable logging (Enable only on advice of our support-team)', 'woo-product-feed-pro');?></span>
|
267 |
+
</td>
|
268 |
+
<td>
|
269 |
+
<label class="woo-product-feed-pro-switch">
|
270 |
+
<?php
|
271 |
+
$add_woosea_logging = get_option ('add_woosea_logging');
|
272 |
+
if($add_woosea_logging == "yes"){
|
273 |
+
print "<input type=\"checkbox\" id=\"add_woosea_logging\" name=\"add_woosea_logging\" class=\"checkbox-field\" checked>";
|
274 |
+
} else {
|
275 |
+
print "<input type=\"checkbox\" id=\"add_woosea_logging\" name=\"add_woosea_logging\" class=\"checkbox-field\">";
|
276 |
+
}
|
277 |
+
?>
|
278 |
+
<div class="woo-product-feed-pro-slider round"></div>
|
279 |
+
</label>
|
280 |
+
</td>
|
281 |
+
</tr>
|
282 |
+
|
283 |
+
|
284 |
+
|
285 |
<tr id="remarketing">
|
286 |
<td>
|
287 |
+
<span><?php _e( 'Enable Google Dynamic Remarketing:', 'woo-product-feed-pro');?></span>
|
288 |
</td>
|
289 |
<td>
|
290 |
<label class="woo-product-feed-pro-switch">
|
315 |
<table class="woo-product-feed-pro-table">
|
316 |
<tr>
|
317 |
<td>
|
318 |
+
<span><?php _e( 'License e-mail:', 'woo-product-feed-pro' );?></span>
|
319 |
</td>
|
320 |
<td>
|
321 |
<input type="text" class="input-field-large" id="license-email" name="license-email" value="<?php print "$license_information[license_email]";?>">
|
323 |
</tr>
|
324 |
<tr>
|
325 |
<td>
|
326 |
+
<span><?php _e( 'License key:', 'woo-product-feed-pro' );?></span>
|
327 |
</td>
|
328 |
<td>
|
329 |
<input type="text" class="input-field-large" id="license-key" name="license-key" value="<?php print "$license_information[license_key]";?>">
|
330 |
</td>
|
331 |
</tr>
|
332 |
<tr>
|
333 |
+
<td colspan="2"><i><?php _e ( 'Please note that leaving your license details you allow us to automatically validate your license once a day.', 'woo-product-feed-pro' );?></i></td>
|
334 |
</tr>
|
335 |
<tr>
|
336 |
<td colspan="2">
|
355 |
$upload_dir = wp_upload_dir();
|
356 |
$external_base = $upload_dir['basedir'];
|
357 |
$external_path = $external_base . "/woo-product-feed-pro/";
|
358 |
+
|
359 |
if (is_writable($external_path)) {
|
360 |
$directory_perm = "True";
|
361 |
} else {
|
453 |
?>
|
454 |
<table class="woo-product-feed-pro-table">
|
455 |
<tr>
|
456 |
+
<td><strong><?php _e( 'Why upgrade to Elite?', 'woo-product-feed-pro' );?></strong></td>
|
457 |
</tr>
|
458 |
<tr>
|
459 |
<td>
|
460 |
+
<?php _e( 'Enjoy all priviliges of our Elite features and priority support and upgrade to the Elite version of our plugin now!', 'woo-product-feed-pro' );?>
|
461 |
<ul>
|
462 |
+
<li><strong>1.</strong> <?php _e( 'Priority support: get your feeds live faster', 'woo-product-feed-pro' );?></li>
|
463 |
+
<li><strong>2.</strong> <?php _e( 'More products approved by Google', 'woo-product-feed-pro' );?></li>
|
464 |
+
<li><strong>3.</strong> <?php _e( 'Add GTIN, brand and more fields to your store', 'woo-product-feed-pro' );?></li>
|
465 |
+
<li><strong>4.</strong> <?php _e( 'Exclude individual products from your feeds', 'woo-product-feed-pro' );?></li>
|
466 |
+
<li><strong>5.</strong> <?php _e( 'WPML support', 'woo-product-feed-pro' );?></li>
|
467 |
+
<li><strong>6.</strong> <?php _e( 'Aelia currency switcher support', 'woo-product-feed-pro');?></li>
|
468 |
</ul>
|
469 |
<strong>
|
470 |
+
<a href="https://adtribes.io/pro-vs-elite/?utm_source=<?php print"$host";?>&utm_medium=manage-settings&utm_campaign=why-upgrade-box" target="_blank"><?php _e( 'Upgrade to Elite here!', 'woo-product-feed-pro' );?></a>
|
471 |
</strong>
|
472 |
</td>
|
473 |
</tr>
|
478 |
|
479 |
<table class="woo-product-feed-pro-table">
|
480 |
<tr>
|
481 |
+
<td><strong><?php _e( 'We’ve got you covered!', 'woo-product-feed-pro' );?></strong></td>
|
482 |
</tr>
|
483 |
<tr>
|
484 |
<td>
|
485 |
+
<?php _e( 'Need assistance? Check out our', 'woo-product-feed-pro' );?>
|
486 |
<ul>
|
487 |
+
<li><strong><a href="https://adtribes.io/support/?utm_source=<?php print"$host";?>&utm_medium=manage-settings&utm_campaign=faq" target="_blank"><?php _e( 'Frequently Asked Questions', 'woo-product-feed-pro' );?></a></strong></li>
|
488 |
+
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank"><?php _e( 'YouTube tutorials', 'woo-product-feed-pro' );?></a></strong></li>
|
489 |
+
<li><strong><a href="https://adtribes.io/tutorials/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=tutorials" target="_blank"><?php _e( 'Tutorials', 'woo-product-feed-pro' );?></a></strong></li>
|
490 |
</ul>
|
491 |
+
<?php _e( 'Or just reach out to us at', 'woo-product-feed-pro' );?> <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank"><?php _e( 'our Wordpress forum', 'woo-product-feed-pro' ); ?></a></strong> <?php _e( 'and we will make sure your product feeds will be up-and-running within no-time.', 'woo-product-feed-pro' );?>
|
492 |
</td>
|
493 |
</tr>
|
494 |
</table><br/>
|
|
|
495 |
|
496 |
<table class="woo-product-feed-pro-table">
|
497 |
<tr>
|
498 |
+
<td><strong><?php _e( 'Our latest tutorials', 'woo-product-feed-pro' );?></strong></td>
|
499 |
</tr>
|
500 |
<tr>
|
501 |
<td>
|
502 |
<ul>
|
503 |
+
<li><strong>1. <a href="https://adtribes.io/setting-up-your-first-google-shopping-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=first shopping feed" target="_blank"><?php _e( 'Create a Google Shopping feed', 'woo-product-feed-pro' );?></a></strong></li>
|
504 |
+
|
505 |
+
<li><strong>2. <a href="https://adtribes.io/feature-product-data-manipulation/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=product_data_manipulation" target="_blank"><?php _e( 'Product data manipulation','woo-product-feed-pro' );?></a></strong></li>
|
506 |
+
|
507 |
+
<li><strong>3. <a href="https://adtribes.io/how-to-create-filters-for-your-product-feed/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=how to create filters" target="_blank"><?php _e( 'How to create filters for your product feed', 'woo-product-feed-pro' );?></a></strong></li>
|
508 |
+
<li><strong>4. <a href="https://adtribes.io/how-to-create-rules/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=how to create rules" target="_blank"><?php _e( 'How to set rules for your product feed', 'woo-product-feed-pro');?></a></strong></li>
|
509 |
+
<li><strong>5. <a href="https://adtribes.io/add-gtin-mpn-upc-ean-product-condition-optimised-title-and-brand-attributes/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=adding fields" target="_blank"><?php _e( 'Adding GTIN, Brand, MPN and more', 'woo-product-feed-pro' );?></a></strong></li>
|
510 |
+
<li><strong>6. <a href="https://adtribes.io/woocommerce-structured-data-bug/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=structured data bug" target="_blank"><?php _e( 'WooCommerce structured data markup bug', 'woo-product-feed-pro' );?></a></strong></li>
|
511 |
+
<li><strong>7. <a href="https://adtribes.io/wpml-support/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=wpml support" target="_blank"><?php _e( 'Enable WPML support', 'woo-product-feed-pro' );?></a></strong></li>
|
512 |
+
<li><strong>8. <a href="https://adtribes.io/aelia-currency-switcher-feature/?utm_source=<?php print "$host";?>&utm_medium=manage-settings&utm_campaign=aelia support" target="_blank"><?php _e( 'Enable Aelia currency switcher support','woo-product-feed-pro' );?></a></strong></li>
|
513 |
+
<li><strong>9. <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=feed stuck" target="_blank"><?php _e( 'Help, my feed is stuck!','woo-product-feed-pro' );?></a></strong></li>
|
514 |
+
<li><strong>10. <a href="https://adtribes.io/help-i-have-none-or-less-products-in-my-product-feed-than-expected/?utm_source=<?php print "$host";?>&utm_medium=manage-feed&utm_campaign=too few products" target="_blank"><?php _e( 'Help, my feed has no or too few products!', 'woo-product-feed-pro' );?></a></strong></li>
|
515 |
</ul>
|
516 |
</td>
|
517 |
</tr>
|
pages/admin/woosea-statistics-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
-
return 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!';
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
@@ -43,7 +43,7 @@ if (array_key_exists('project_hash', $_GET)){
|
|
43 |
<div class="woo-product-feed-pro-form-style-2">
|
44 |
<table class="woo-product-feed-pro-table">
|
45 |
<tbody class="woo-product-feed-pro-body">
|
46 |
-
<div class="woo-product-feed-pro-form-style-2-heading"
|
47 |
|
48 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
49 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
3 |
* Change default footer text, asking to review our plugin
|
4 |
**/
|
5 |
function my_footer_text($default) {
|
6 |
+
return _e( 'If you like our <strong>WooCommerce Product Feed PRO</strong> plugin please leave us a <a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="woo-product-feed-pro-ratingRequest">★★★★★</a> rating. Thanks in advance!','woo-product_feed-pro' );
|
7 |
}
|
8 |
add_filter('admin_footer_text', 'my_footer_text');
|
9 |
|
43 |
<div class="woo-product-feed-pro-form-style-2">
|
44 |
<table class="woo-product-feed-pro-table">
|
45 |
<tbody class="woo-product-feed-pro-body">
|
46 |
+
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Feed statistics','woo-product-feed-pro' );?></div>
|
47 |
|
48 |
<div class="<?php _e($notifications_box['message_type']); ?>">
|
49 |
<p><?php _e($notifications_box['message'], 'sample-text-domain' ); ?></p>
|
pages/admin/woosea-upgrade-elite.php
CHANGED
@@ -132,7 +132,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
132 |
<ul>
|
133 |
<li><strong><a href="https://adtribes.io/support/" target="_blank">Frequently Asked Questions</a></strong></li>
|
134 |
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank">YouTube tutorials</a></strong></li>
|
135 |
-
<li><strong><a href="https://adtribes.io/
|
136 |
<li><strong><a href="https://adtribes.io/pro-vs-elite/?utm_source=$domain&utm_medium=plugin&utm_campaign=upgrade-elite" target="_blank">Upgrade to Elite</a></strong></li>
|
137 |
</ul>
|
138 |
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank">the support forum</a></strong> and we'll make sure your product feeds will be up-and-running within no-time.
|
@@ -142,7 +142,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
142 |
|
143 |
<table class="woo-product-feed-pro-table">
|
144 |
<tr>
|
145 |
-
<td><strong>Our latest
|
146 |
</tr>
|
147 |
<tr>
|
148 |
<td>
|
132 |
<ul>
|
133 |
<li><strong><a href="https://adtribes.io/support/" target="_blank">Frequently Asked Questions</a></strong></li>
|
134 |
<li><strong><a href="https://www.youtube.com/channel/UCXp1NsK-G_w0XzkfHW-NZCw" target="_blank">YouTube tutorials</a></strong></li>
|
135 |
+
<li><strong><a href="https://adtribes.io/tutorials/" target="_blank">Tutorials</a></strong></li>
|
136 |
<li><strong><a href="https://adtribes.io/pro-vs-elite/?utm_source=$domain&utm_medium=plugin&utm_campaign=upgrade-elite" target="_blank">Upgrade to Elite</a></strong></li>
|
137 |
</ul>
|
138 |
Or just reach out to us at <strong><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/" target="_blank">the support forum</a></strong> and we'll make sure your product feeds will be up-and-running within no-time.
|
142 |
|
143 |
<table class="woo-product-feed-pro-table">
|
144 |
<tr>
|
145 |
+
<td><strong>Our latest tutorials</strong></td>
|
146 |
</tr>
|
147 |
<tr>
|
148 |
<td>
|
readme.txt
CHANGED
@@ -3,14 +3,14 @@ Contributors: jorisverwater,evavangelooven
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=j_verwater%40hotmail%2ecom&lc=NL&item_name=Donation%20WooCommerce%20Product%20Feed%20Pro%20%2d%20AdTribes%2eio¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
License: GPLv3
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
-
Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger
|
7 |
Requires at least: 4.5
|
8 |
-
Tested up to: 5.
|
9 |
-
Stable tag:
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
Generate WooCommerce product feeds for all your marketing channels, such as Google Shopping (merchant center),
|
14 |
|
15 |
= Why choose this plugin? =
|
16 |
Simply because this is the most complete plugin offering support for an unlimited number of products and feeds, including features such as category- & field-mapping and advanced, rule-based, filtering and product variables support.
|
@@ -41,9 +41,6 @@ Because of a bug in WooCommerce variable products will get disapproved in Google
|
|
41 |
= Add critical Google Shopping Feed fields to your store =
|
42 |
Google requires you to add certain fields to the feed you create for Google Shopping. However not all of the required fields are present in WooCommerce. Our plugin add's these fields / attributes for you so you can create a product feed that meets Google's requirements. The plugin will add the following product input fields for you: Brand, GTIN, UPC, MPN, EAN, Product condition (New, Refurbished, Used) unit pricing measure, unit pricing base measure, installment and an Optimised title field.
|
43 |
|
44 |
-
= Conversion tracking =
|
45 |
-
As of version 1.8.8 the plugin is able to track sales and conversions coming from your product feeds. Just enable the 'conversion tracking' and the plugin will measure how much turn-over is coming from your marketing campaigns. The plugin uses both session- and cookie-conversions to make sure all sales are tracked.
|
46 |
-
|
47 |
= Custom Fields =
|
48 |
Add custom fields with naming you require and fill it with static or dynamic values to your product feed.
|
49 |
|
@@ -94,7 +91,6 @@ Our plugin supports the Aelia Currency Switcher
|
|
94 |
* XML, CSV, TSV and TXT formats;
|
95 |
* Supports WPML (version 4.1 and higher)
|
96 |
* Supports WCML, WooCommerce Multilingual
|
97 |
-
* Tracks conversions and sales;
|
98 |
* Intuitive interface;
|
99 |
* Supports product variations / variables;
|
100 |
* Scheduled product feed refreshes: daily, twice-daily or every hour;
|
@@ -109,12 +105,14 @@ Our plugin supports the Aelia Currency Switcher
|
|
109 |
* Supports the official Facebook for WooCommerce plugin (SKU_ID parameter)
|
110 |
* Supports Yoasts primary category feature
|
111 |
* Supports Yith brand attributes
|
|
|
112 |
* Supports WooCommerce Dynamic Pricing & Discounts from RightPress
|
113 |
* Supports WC Fields Factory
|
114 |
|
115 |
=== Channels ===
|
116 |
* Custom feeds
|
117 |
* Google Shopping
|
|
|
118 |
* Google DRM / Dynamic remarketing
|
119 |
* Google Merchant Promotions feed
|
120 |
* Google DSA (Dynamic Search Ads)
|
@@ -122,6 +120,7 @@ Our plugin supports the Aelia Currency Switcher
|
|
122 |
* Google Local Products Inventory
|
123 |
* Facebook Dynamic Ad’s / remarketing
|
124 |
* Bing Shopping
|
|
|
125 |
* <a href="https://yandex.com/support/market-tech-requirements/index.html" target="_blank">Yandex</a>
|
126 |
* ShopMania
|
127 |
* Shopping.com
|
@@ -142,6 +141,7 @@ Our plugin supports the Aelia Currency Switcher
|
|
142 |
* <a href="https://www.zbozi.cz" target="_blank">Zbozi.cz</a>
|
143 |
* Shopalike
|
144 |
* <a href="https://www.heureka.cz" target="_blank">Heureka.cz</a>
|
|
|
145 |
* AdForm
|
146 |
* Smartly.io
|
147 |
* Spartoo
|
@@ -186,6 +186,8 @@ Our plugin supports the Aelia Currency Switcher
|
|
186 |
* Medizinfuchs.de
|
187 |
* <a href="https://www.moebel.de" target="_blank">Moebel.de</a>
|
188 |
* <a href="https://www.zap.co.il" target="_blank">Zap.co.il</a>
|
|
|
|
|
189 |
* My Best Brands
|
190 |
* Preis.de
|
191 |
* Rakuten
|
@@ -273,6 +275,325 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
273 |
|
274 |
=== Changelog ===
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
= 5.0.0 (2019-03-08) =
|
277 |
* Fixed a PHP undefined variable warning
|
278 |
|
@@ -1529,6 +1850,325 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
1529 |
|
1530 |
== Upgrade Notice ==
|
1531 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1532 |
= 5.0.0 =
|
1533 |
Fixed a PHP undefined variable warning
|
1534 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=j_verwater%40hotmail%2ecom&lc=NL&item_name=Donation%20WooCommerce%20Product%20Feed%20Pro%20%2d%20AdTribes%2eio¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
License: GPLv3
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
+
Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
|
7 |
Requires at least: 4.5
|
8 |
+
Tested up to: 5.2
|
9 |
+
Stable tag: 6.0.0
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Generate WooCommerce product feeds for all your marketing channels, such as Google Shopping (merchant center), Facebook Remarketing, Bing Ads, Billiger.de, Pricerunner, Vergelijk.nl and many more. Next to custom feeds there are over 100 pre-defined templates included for marketplaces, comparison shopping engines and search engines. This plugin provides high-quality product feed for Google Shopping and many many more.
|
14 |
|
15 |
= Why choose this plugin? =
|
16 |
Simply because this is the most complete plugin offering support for an unlimited number of products and feeds, including features such as category- & field-mapping and advanced, rule-based, filtering and product variables support.
|
41 |
= Add critical Google Shopping Feed fields to your store =
|
42 |
Google requires you to add certain fields to the feed you create for Google Shopping. However not all of the required fields are present in WooCommerce. Our plugin add's these fields / attributes for you so you can create a product feed that meets Google's requirements. The plugin will add the following product input fields for you: Brand, GTIN, UPC, MPN, EAN, Product condition (New, Refurbished, Used) unit pricing measure, unit pricing base measure, installment and an Optimised title field.
|
43 |
|
|
|
|
|
|
|
44 |
= Custom Fields =
|
45 |
Add custom fields with naming you require and fill it with static or dynamic values to your product feed.
|
46 |
|
91 |
* XML, CSV, TSV and TXT formats;
|
92 |
* Supports WPML (version 4.1 and higher)
|
93 |
* Supports WCML, WooCommerce Multilingual
|
|
|
94 |
* Intuitive interface;
|
95 |
* Supports product variations / variables;
|
96 |
* Scheduled product feed refreshes: daily, twice-daily or every hour;
|
105 |
* Supports the official Facebook for WooCommerce plugin (SKU_ID parameter)
|
106 |
* Supports Yoasts primary category feature
|
107 |
* Supports Yith brand attributes
|
108 |
+
* Supports WooCommerce Product Bundles
|
109 |
* Supports WooCommerce Dynamic Pricing & Discounts from RightPress
|
110 |
* Supports WC Fields Factory
|
111 |
|
112 |
=== Channels ===
|
113 |
* Custom feeds
|
114 |
* Google Shopping
|
115 |
+
* Google Product Reviews
|
116 |
* Google DRM / Dynamic remarketing
|
117 |
* Google Merchant Promotions feed
|
118 |
* Google DSA (Dynamic Search Ads)
|
120 |
* Google Local Products Inventory
|
121 |
* Facebook Dynamic Ad’s / remarketing
|
122 |
* Bing Shopping
|
123 |
+
* Pinterest
|
124 |
* <a href="https://yandex.com/support/market-tech-requirements/index.html" target="_blank">Yandex</a>
|
125 |
* ShopMania
|
126 |
* Shopping.com
|
141 |
* <a href="https://www.zbozi.cz" target="_blank">Zbozi.cz</a>
|
142 |
* Shopalike
|
143 |
* <a href="https://www.heureka.cz" target="_blank">Heureka.cz</a>
|
144 |
+
* <a href="https://www.glami.gr" target="_blank">Glami.gr</a>
|
145 |
* AdForm
|
146 |
* Smartly.io
|
147 |
* Spartoo
|
186 |
* Medizinfuchs.de
|
187 |
* <a href="https://www.moebel.de" target="_blank">Moebel.de</a>
|
188 |
* <a href="https://www.zap.co.il" target="_blank">Zap.co.il</a>
|
189 |
+
* <a href="https://www.shopmania.com" target="_blank">ShopMania</a>
|
190 |
+
* <a href="https://www.compari.ro" target="_blank">Compari.ro</a>
|
191 |
* My Best Brands
|
192 |
* Preis.de
|
193 |
* Rakuten
|
275 |
|
276 |
=== Changelog ===
|
277 |
|
278 |
+
= 6.0.0 (2019-07-09) =
|
279 |
+
* Added advanced WooCommerce logging
|
280 |
+
|
281 |
+
= 5.9.9 (2019-07-08) =
|
282 |
+
* Fixed a bug: Yandex category feed lists where not translated using WPML. This issue has been fixed now.
|
283 |
+
|
284 |
+
= 5.9.8 (2019-07-08) =
|
285 |
+
* Added support for WC Field Factory Admin fields
|
286 |
+
|
287 |
+
= 5.9.7 (2019-07-05) =
|
288 |
+
* Added support for sale and regular prices for bundled products
|
289 |
+
|
290 |
+
= 5.9.6 (2019-07-05) =
|
291 |
+
* Added support for bundled products that have a combined price
|
292 |
+
* When a product has no reviews remove the average rating score of 0 from the feed
|
293 |
+
|
294 |
+
= 5.9.5 (2019-07-04) =
|
295 |
+
* Fixed a bug: adding fields on the field mapping page did not work in Firefox. This has been fixed now.
|
296 |
+
* Fixed php warnings: when a Google Product Review Feed was created and attributes contained html characters PHP warnings were shown. This has been fixed now.
|
297 |
+
|
298 |
+
= 5.9.4 (2019-07-04) =
|
299 |
+
* Fixed links to tutorials in the feed configuration screens.
|
300 |
+
|
301 |
+
= 5.9.3 (2019-07-02) =
|
302 |
+
* Added color, size, gender, material and pattern product fields for the extra fields feature
|
303 |
+
|
304 |
+
= 5.9.2 (2019-07-01) =
|
305 |
+
* Added South-Africa PriceCheck.co.za template
|
306 |
+
|
307 |
+
= 5.9.1 (2019-06-28) =
|
308 |
+
* Internationalized the plugin menu's: texts are now translatable.
|
309 |
+
|
310 |
+
= 5.9.0 (2019-06-27) =
|
311 |
+
* Internationalized the plugin: texts are now translatable.
|
312 |
+
|
313 |
+
= 5.8.9 (2019-06-26) =
|
314 |
+
* Added support for comma's in Yandex PARAM fields
|
315 |
+
|
316 |
+
= 5.8.8 (2019-06-26) =
|
317 |
+
* Fixed a bug: rules for empty values contained a bug. This has been fixed now.
|
318 |
+
|
319 |
+
= 5.8.7 (2019-06-24) =
|
320 |
+
* Fixed a bug: mappings for WooCommerce categories that contained () where not working. This has been fixed now.
|
321 |
+
|
322 |
+
= 5.8.6 (2019-06-22) =
|
323 |
+
* Added the Glami.gr template
|
324 |
+
|
325 |
+
= 5.8.5 (2019-06-21) =
|
326 |
+
* Fixed a bug: "empty" rules replacing empty attributes with another attribute value was not working. This has been fixed now.
|
327 |
+
|
328 |
+
= 5.8.4 (2019-06-21) =
|
329 |
+
* Changed Aelia currency support feature as it was retrieving cached prices.
|
330 |
+
|
331 |
+
= 5.8.3 (2019-06-20) =
|
332 |
+
* Added support for the transit time label field for Google Shopping feeds.
|
333 |
+
|
334 |
+
= 5.8.2 (2019-06-17) =
|
335 |
+
* Made the ShopMania template suitable for all countries they are active in.
|
336 |
+
|
337 |
+
= 5.8.1 (2019-06-14) =
|
338 |
+
* Further improvements to the Dynamic Remarketing code, extra check on prices of variant products
|
339 |
+
|
340 |
+
= 5.8.0 (2019-06-13) =
|
341 |
+
* Fixed a bug in the Google Dynamic Remarketing code, variants where getting the item_group_id filled in in the ecomm_prodid parameters which was causing a mismatch with the product feed. This has been fixed.
|
342 |
+
|
343 |
+
= 5.7.9 (2019-06-13) =
|
344 |
+
* Further improvement of the default variant inclusion feature. Plugin now also add's the default variant (when option enabled) when none of the variants matches that default.
|
345 |
+
* Fixed a bug: the data manipulation feature for variants (when variants was selected, simple and all worked) was broken. This has been fixed.
|
346 |
+
|
347 |
+
= 5.7.8 (2019-06-12) =
|
348 |
+
* Added ads_grouping and ads_labels fields to the Google Shopping template
|
349 |
+
|
350 |
+
= 5.7.7 (2019-06-12) =
|
351 |
+
* Solved a google_product_category mapping bug for simple products that were mapped to multiple categories.
|
352 |
+
|
353 |
+
= 5.7.6 (2019-06-12) =
|
354 |
+
* Added template for Compari Romania
|
355 |
+
* Added template for Shopmania Romania
|
356 |
+
|
357 |
+
= 5.7.5 (2019-06-11) =
|
358 |
+
* Removed conversion UI features for now till we officially release this feature.
|
359 |
+
|
360 |
+
= 5.7.4 (2019-06-11) =
|
361 |
+
* Added support for creating rules and filters on featured products
|
362 |
+
|
363 |
+
= 5.7.3 (2019-06-10) =
|
364 |
+
* Fixed a PHP warning that showed whem WPML and Aelia currecy converters where active
|
365 |
+
|
366 |
+
= 5.7.2 (2019-06-06) =
|
367 |
+
* Fixed a bug: rules on empty product attributes were not working. This has been fixed.
|
368 |
+
|
369 |
+
= 5.7.1 (2019-06-05) =
|
370 |
+
* Made it impossible to delete the item_group_id field mapping from Google Shopping and Facebook feeds.
|
371 |
+
|
372 |
+
= 5.7.0 (2019-06-04) =
|
373 |
+
* Fixed a bug: rules set on google categories did not work. Those are fixed now.
|
374 |
+
|
375 |
+
= 5.6.9 (2019-06-03) =
|
376 |
+
* Fixed a bug: the tmp product feed files created upon creation and updating of the feeds where not removed. They are now.
|
377 |
+
|
378 |
+
= 5.6.8 (2019-05-30) =
|
379 |
+
* Added fallback scenario, when no default templace can be loaded the Google Shopping template will be used
|
380 |
+
|
381 |
+
= 5.6.7 (2019-05-29) =
|
382 |
+
* Minor change to the Aelia currency switcher support, now also supporting the Aelia rounding plugin
|
383 |
+
|
384 |
+
= 5.6.6 (2019-05-29) =
|
385 |
+
* Added the offer_price and offer_price_effective_date fields for Facebook product catalogue feeds
|
386 |
+
|
387 |
+
= 5.6.5 (2019-05-29) =
|
388 |
+
* Added the possibility to add prefix and suffix values around the image_link field without spaces between it
|
389 |
+
|
390 |
+
= 5.6.4 (2019-05-26) =
|
391 |
+
* PARAM_ fields for Yandex were broken. This bug has been fixed now.
|
392 |
+
|
393 |
+
= 5.6.3 (2019-05-26) =
|
394 |
+
* Solved a conflict between Rightpress and the Aelia currency converter
|
395 |
+
|
396 |
+
= 5.6.2 (2019-05-26) =
|
397 |
+
* Added UTF8 and html entity checks for Google Product Review feeds data
|
398 |
+
|
399 |
+
= 5.6.1 (2019-05-23) =
|
400 |
+
* Added the item_group_id field as an default and required field for the Pinterest template
|
401 |
+
|
402 |
+
= 5.6.0 (2019-05-21) =
|
403 |
+
* Build in an extra check to cope with "invalid WooCommerce products"
|
404 |
+
* RSS dashboard on WP-admin not showing when RSS feed cannot be retrieved
|
405 |
+
|
406 |
+
= 5.5.9 (2019-05-19) =
|
407 |
+
* Added the "add to cart link" attribute
|
408 |
+
|
409 |
+
= 5.5.8 (2019-05-18) =
|
410 |
+
* Added link to feed location on manage feeds page
|
411 |
+
|
412 |
+
= 5.5.7 (2019-05-15) =
|
413 |
+
* Fixed bugs in Google's product review feed nodes
|
414 |
+
|
415 |
+
= 5.5.6 (2019-05-15) =
|
416 |
+
* Removed spaces in prefix and suffix for SKU attribute
|
417 |
+
|
418 |
+
= 5.5.5 (2019-05-15) =
|
419 |
+
* On popular demand added the availability of a wc_post_id_product_id attribute for Facebook feeds
|
420 |
+
|
421 |
+
= 5.5.4 (2019-05-14) =
|
422 |
+
* Fixed a bug where the identifier nodes in the Google Product Review feeds were not complete. This issue has been fixed now.
|
423 |
+
|
424 |
+
= 5.5.3 (2019-05-14) =
|
425 |
+
* Users that created a custom feed and had deleted products in their database reported on empty product nodes. This release attempts to fix that issue.
|
426 |
+
|
427 |
+
= 5.5.2 (2019-05-11) =
|
428 |
+
* Fixed a PHP warning that showed when using the Aelia currency switcher
|
429 |
+
|
430 |
+
= 5.5.1 (2019-05-05) =
|
431 |
+
* Added links to support pages
|
432 |
+
|
433 |
+
= 5.5.0 (2019-05-03) =
|
434 |
+
* Checked for WordPress 5.2 compatibility
|
435 |
+
|
436 |
+
= 5.4.9 (2019-05-03) =
|
437 |
+
* Fixed a PHP warning that showed after processing of Yandex feeds
|
438 |
+
|
439 |
+
= 5.4.8 (2019-04-29) =
|
440 |
+
* Fixed support for Cyrillic characters in the Yandex PARAM field
|
441 |
+
* Removed the Yandex platform node from the YML as it is no longer an accepted field for Yandex
|
442 |
+
|
443 |
+
= 5.4.7 (2019-04-29) =
|
444 |
+
* Changed the XML header of the Heureka.cz template
|
445 |
+
|
446 |
+
= 5.4.6 (2019-04-26) =
|
447 |
+
* Fixed support for rightpress
|
448 |
+
|
449 |
+
= 5.4.5 (2019-04-25) =
|
450 |
+
* Cleaned the filter and rule drop-downs. Removed the replace option as that is not fully functioning yet.
|
451 |
+
|
452 |
+
= 5.4.4 (2019-04-23) =
|
453 |
+
* Re-arranged some of the attributes in the drop-down in order for the important attributes to show above the (long) list of custom attributes
|
454 |
+
|
455 |
+
= 5.4.3 (2019-04-23) =
|
456 |
+
* Solved the same bug again: products that had only one review did not end up in Google's Product Review Feed. This issue has been fixed now.
|
457 |
+
|
458 |
+
= 5.4.2 (2019-04-22) =
|
459 |
+
* Change to Google Product Review Feed: names need to be shorten (anonymous)
|
460 |
+
|
461 |
+
= 5.4.1 (2019-04-22) =
|
462 |
+
* Solved a bug: products that had only one review did not end up in Google's Product Review Feed. This issue has been fixed now.
|
463 |
+
|
464 |
+
= 5.4.0 (2019-04-21) =
|
465 |
+
* Solved a PHP warning that showed for some users when setting-up a feed.
|
466 |
+
|
467 |
+
= 5.3.9 (2019-04-18) =
|
468 |
+
* Solved a PHP warning that showed on the feed settings page when all feeds were deleted
|
469 |
+
* Changed texts in the review notification
|
470 |
+
|
471 |
+
= 5.3.8 (2019-04-18) =
|
472 |
+
* Tested compatibility for WooCommerce 3.6
|
473 |
+
* Added the "on backorder" support for the availability attribute
|
474 |
+
* Solved a bug where in some browsers field mappings could not be added or deleted
|
475 |
+
|
476 |
+
= 5.3.7 (2019-04-17) =
|
477 |
+
* Solved a conflict with the Yoast SEO plugin where the category path was empty for some products.
|
478 |
+
|
479 |
+
= 5.3.6 (2019-04-16) =
|
480 |
+
* We have added 5 custom fields (_woosea_custom_field_0 to 5) that can be used for adding product information to feeds
|
481 |
+
* Google added new attributes that can be used in Google Shopping: installment and subscription cost. We have added those to the Google Shopping template
|
482 |
+
|
483 |
+
= 5.3.5 (2019-04-16) =
|
484 |
+
* Products that are on back-order will now have the availability status "out of stock" whereas previously they were shown as being "on stock"
|
485 |
+
|
486 |
+
= 5.3.4 (2019-04-15) =
|
487 |
+
* Fixed a bug in the category mapping for level-3 categories. When those categories were mapped to a Google category they did not show in the product feed. This has been fixed now.
|
488 |
+
|
489 |
+
= 5.3.3 (2019-04-14) =
|
490 |
+
* General clean-up of code
|
491 |
+
* Changed batch size for product feeds over 50.000 products
|
492 |
+
|
493 |
+
= 5.3.2 (2019-04-11) =
|
494 |
+
* Fixed a bug in filters for product tags
|
495 |
+
|
496 |
+
= 5.3.1 (2019-04-10) =
|
497 |
+
* Added support for adding parameters to the link attribute for CSV feeds
|
498 |
+
|
499 |
+
= 5.3.0 (2019-04-10) =
|
500 |
+
* Solved some PHP warnings that were showing when configuring a CSV feed with Aelia currencies in it
|
501 |
+
* Added support for adding parameters to the link attribute for CSV feeds
|
502 |
+
|
503 |
+
= 5.2.9 (2019-04-09) =
|
504 |
+
* Added some extra allowed characters (% and ,) in the Yandex PARAM XML node
|
505 |
+
* Added the review_url field to Google Product Review feeds
|
506 |
+
* Fixed the review_timestamp format for Google Product Review feeds
|
507 |
+
|
508 |
+
= 5.2.8 (2019-04-08) =
|
509 |
+
* Fixed a bug in the Google Product Review feed where the min/max rating values were wrong.
|
510 |
+
|
511 |
+
= 5.2.7 (2019-04-07) =
|
512 |
+
* Added support for the official WooCommerce Product Bundles (https://woocommerce.com/products/product-bundles/)
|
513 |
+
|
514 |
+
= 5.2.6 (2019-04-04) =
|
515 |
+
* Added the "is promotion" attribute for Google Merchant Promotion feeds
|
516 |
+
|
517 |
+
= 5.2.5 (2019-04-02) =
|
518 |
+
* Fixed a category mapping issue. The preg match was matching too many results, mainly accessories
|
519 |
+
|
520 |
+
= 5.2.4 (2019-04-02) =
|
521 |
+
* Fixed another exotic category mapping issue that occured when users left some category mappings blank
|
522 |
+
|
523 |
+
= 5.2.3 (2019-04-02) =
|
524 |
+
* Fixed a bug: plugin was added main category names to a category mapping, even when that main category was not active for a product. This caused unexpected category mappings in product feeds. This has been solved now.
|
525 |
+
|
526 |
+
= 5.2.2 (2019-04-01) =
|
527 |
+
* Added support for usage of whitespaces in the so-called PARAM_ nodes for Yandex, Zbozi and Heureka feeds.
|
528 |
+
|
529 |
+
= 5.2.1 (2019-03-31) =
|
530 |
+
* Reverted back some of the rule fixes from the previous release as it caused non Google feeds to become empty
|
531 |
+
|
532 |
+
= 5.2.0 (2019-03-29) =
|
533 |
+
* Fixed a Pinterest bug, templare was not loading
|
534 |
+
* Fixed rules that were created on Google category attributes
|
535 |
+
|
536 |
+
= 5.1.9 (2019-03-29) =
|
537 |
+
* Added support for Pinterest, our plugin now contains a default template for it
|
538 |
+
|
539 |
+
= 5.1.8 (2019-03-29) =
|
540 |
+
* Added support for Google Product Review feeds
|
541 |
+
|
542 |
+
= 5.1.7 (2019-03-27) =
|
543 |
+
* Added support for Cyrrilic characters in PARAM_ parameters for Yandex, Zbozi and Heureka feeds.
|
544 |
+
|
545 |
+
= 5.1.6 (2019-03-26) =
|
546 |
+
* Build in another check for when users add a variable product to their product feed that isn't really a variable product. This caused the plugin to get stuck when processing product feeds.
|
547 |
+
|
548 |
+
= 5.1.5 (2019-03-26) =
|
549 |
+
* Build in a check for when users add a variable product to their product feed that isn't really a variable product. This caused the plugin to get stuck when processing product feeds.
|
550 |
+
|
551 |
+
= 5.1.4 (2019-03-25) =
|
552 |
+
* Added PARAM support for Yandex feeds
|
553 |
+
|
554 |
+
= 5.1.3 (2019-03-24) =
|
555 |
+
* Added PARAM support for Zbozi.cz and Heureka.cz product feeds
|
556 |
+
|
557 |
+
= 5.1.2 (2019-03-22) =
|
558 |
+
* New powerful feature: product data manipulation. Combine different fields and attributes to one piece of product data to improve the quality of your product feeds
|
559 |
+
* Fixed some PHP warnings that showed upon activation of the plugin
|
560 |
+
* Fixed naming of Ricardo.ch
|
561 |
+
* Added Ricarco.ch template
|
562 |
+
|
563 |
+
= 5.1.1 (2019-03-19) =
|
564 |
+
* Added support for named attributes for Zbozi.ch and Heureka.cz
|
565 |
+
* Fixed an issue where comparisons on numeric numbers bigger than 1000 did not work
|
566 |
+
|
567 |
+
= 5.1.0 (2019-03-18) =
|
568 |
+
* Fixed a bug where category mappings that contained apastrophe were not saved. This issue has been fixed now.
|
569 |
+
|
570 |
+
= 5.0.9 (2019-03-17) =
|
571 |
+
* Fixed an issue where empty rules on product descriptions contained only shortcodes did not work
|
572 |
+
|
573 |
+
= 5.0.8 (2019-03-17) =
|
574 |
+
* Fixed a PHP warning that showed in the logs when a than-rule was set on an empty or non-excisiting attribute
|
575 |
+
|
576 |
+
= 5.0.7 (2019-03-16) =
|
577 |
+
* Added 6 new fields to the product edit pages which you can use for your product feeds: cost of good sold, multipack, is bundle, energy efficiency class, minimum energy efficiency class and maximum energy efficiency class
|
578 |
+
|
579 |
+
= 5.0.6 (2019-03-14) =
|
580 |
+
* Fixed another priceValidUntil structured data markup issue
|
581 |
+
|
582 |
+
= 5.0.5 (2019-03-13) =
|
583 |
+
* Fixed a bug when enabling the select default variant only option
|
584 |
+
|
585 |
+
= 5.0.4 (2019-03-12) =
|
586 |
+
* Added priceValidUntil and url structured data mark-up to default WooCommerce structured data and added it to the structured data markup feature of this plugin
|
587 |
+
|
588 |
+
= 5.0.3 (2019-03-12) =
|
589 |
+
* Fixed another YML bug for Yandex (shop node was misplaced).
|
590 |
+
|
591 |
+
= 5.0.2 (2019-03-11) =
|
592 |
+
* Fixed a bug for Yandex and Zap.co.il feeds where XML nodes were put in multiple times.
|
593 |
+
|
594 |
+
= 5.0.1 (2019-03-10) =
|
595 |
+
* Added the age_group input field on product edit pages
|
596 |
+
|
597 |
= 5.0.0 (2019-03-08) =
|
598 |
* Fixed a PHP undefined variable warning
|
599 |
|
1850 |
|
1851 |
== Upgrade Notice ==
|
1852 |
|
1853 |
+
= 6.0.0 =
|
1854 |
+
Added advanced WooCommerce logging
|
1855 |
+
|
1856 |
+
= 5.9.9 =
|
1857 |
+
Fixed a bug: Yandex category feed lists where not translated using WPML. This issue has been fixed now.
|
1858 |
+
|
1859 |
+
= 5.9.8 =
|
1860 |
+
Added support for WC Field Factory Admin fields
|
1861 |
+
|
1862 |
+
= 5.9.7 =
|
1863 |
+
Added support for sale and regular prices for bundled products
|
1864 |
+
|
1865 |
+
= 5.9.6 =
|
1866 |
+
Added support for bundled products that have a combined price
|
1867 |
+
When a product has no reviews remove the average rating score of 0 from the feed
|
1868 |
+
|
1869 |
+
= 5.9.5 =
|
1870 |
+
Fixed a bug: adding fields on the field mapping page did not work in Firefox. This has been fixed now.
|
1871 |
+
Fixed php warnings: when a Google Product Review Feed was created and attributes contained html characters PHP warnings were shown. This has been fixed now.
|
1872 |
+
|
1873 |
+
= 5.9.4 =
|
1874 |
+
Fixed links to tutorials in the feed configuration screens.
|
1875 |
+
|
1876 |
+
= 5.9.3 =
|
1877 |
+
Added color, size, gender, material and pattern product fields for the extra fields feature
|
1878 |
+
|
1879 |
+
= 5.9.2 =
|
1880 |
+
Added South-Africa PriceCheck.co.za template
|
1881 |
+
|
1882 |
+
= 5.9.1 =
|
1883 |
+
Internationalized the plugin menu's: texts are now translatable.
|
1884 |
+
|
1885 |
+
= 5.9.0 =
|
1886 |
+
Internationalized the plugin: texts are now translatable.
|
1887 |
+
|
1888 |
+
= 5.8.9 =
|
1889 |
+
Added support for comma's in Yandex PARAM fields
|
1890 |
+
|
1891 |
+
= 5.8.8. =
|
1892 |
+
Fixed a bug: rules for empty values contained a bug. This has been fixed now.
|
1893 |
+
|
1894 |
+
= 5.8.7 =
|
1895 |
+
Fixed a bug: mappings for WooCommerce categories that contained () where not working. This has been fixed now.
|
1896 |
+
|
1897 |
+
= 5.8.6 =
|
1898 |
+
Added the Glami.gr template
|
1899 |
+
|
1900 |
+
= 5.8.5 =
|
1901 |
+
Fixed a bug: "empty" rules replacing empty attributes with another attribute value was not working. This has been fixed now.
|
1902 |
+
|
1903 |
+
= 5.8.4 =
|
1904 |
+
Changed Aelia currency support feature as it was retrieving cached prices.
|
1905 |
+
|
1906 |
+
= 5.8.3 =
|
1907 |
+
Added support for the transit time label field for Google Shopping feeds.
|
1908 |
+
|
1909 |
+
= 5.8.2 =
|
1910 |
+
Made the ShopMania template suitable for all countries they are active in.
|
1911 |
+
|
1912 |
+
= 5.8.1 =
|
1913 |
+
Further improvements to the Dynamic Remarketing code, extra check on prices of variant products
|
1914 |
+
|
1915 |
+
= 5.8.0 =
|
1916 |
+
Fixed a bug in the Google Dynamic Remarketing code, variants where getting the item_group_id filled in in the ecomm_prodid parameters which was causing a mismatch with the product feed. This has been fixed.
|
1917 |
+
|
1918 |
+
= 5.7.9 =
|
1919 |
+
Further improvement of the default variant inclusion feature. Plugin now also add's the default variant (when option enabled) when none of the variants matches that default.
|
1920 |
+
Fixed a bug: the data manipulation feature for variants (when variants was selected, simple and all worked) was broken. This has been fixed.
|
1921 |
+
|
1922 |
+
= 5.7.8 =
|
1923 |
+
Added ads_grouping and ads_labels fields to the Google Shopping template
|
1924 |
+
|
1925 |
+
= 5.7.7 =
|
1926 |
+
Solved a google_product_category mapping bug for simple products that were mapped to multiple categories.
|
1927 |
+
|
1928 |
+
= 5.7.6 =
|
1929 |
+
Added template for Compari Romania
|
1930 |
+
Added template for Shopmania Romania
|
1931 |
+
|
1932 |
+
= 5.7.5 =
|
1933 |
+
Removed conversion UI features for now till we officially release this feature.
|
1934 |
+
|
1935 |
+
= 5.7.4 =
|
1936 |
+
Added support for creating rules and filters on featured products
|
1937 |
+
|
1938 |
+
= 5.7.3 =
|
1939 |
+
Fixed a PHP warning that showed whem WPML and Aelia currecy converters where active
|
1940 |
+
|
1941 |
+
= 5.7.2 =
|
1942 |
+
Fixed a bug: rules on empty product attributes were not working. This has been fixed.
|
1943 |
+
|
1944 |
+
= 5.7.1 =
|
1945 |
+
Made it impossible to delete the item_group_id field mapping from Google Shopping and Facebook feeds.
|
1946 |
+
|
1947 |
+
= 5.7.0 =
|
1948 |
+
Fixed a bug: rules set on google categories did not work. Those are fixed now.
|
1949 |
+
|
1950 |
+
= 5.6.9 =
|
1951 |
+
Fixed a bug: the tmp product feed files created upon creation and updating of the feeds where not removed. They are now.
|
1952 |
+
|
1953 |
+
= 5.6.8 =
|
1954 |
+
Added fallback scenario, when no default templace can be loaded the Google Shopping template will be used
|
1955 |
+
|
1956 |
+
= 5.6.7 =
|
1957 |
+
Minor change to the Aelia currency switcher support, now also supporting the Aelia rounding plugin
|
1958 |
+
|
1959 |
+
= 5.6.6 =
|
1960 |
+
Added the offer_price and offer_price_effective_date fields for Facebook product catalogue feeds
|
1961 |
+
|
1962 |
+
= 5.6.5 =
|
1963 |
+
Added the possibility to add prefix and suffix values around the image_link field without spaces between it
|
1964 |
+
|
1965 |
+
= 5.6.4 =
|
1966 |
+
PARAM_ fields for Yandex were broken. This bug has been fixed now.
|
1967 |
+
|
1968 |
+
= 5.6.3 =
|
1969 |
+
Solved a conflict between Rightpress and the Aelia currency converter
|
1970 |
+
|
1971 |
+
= 5.6.2 =
|
1972 |
+
Added UTF8 and html entity checks for Google Product Review feeds data
|
1973 |
+
|
1974 |
+
= 5.6.1 =
|
1975 |
+
Added the item_group_id field as an default and required field for the Pinterest template
|
1976 |
+
|
1977 |
+
= 5.6.0 =
|
1978 |
+
Build in an extra check to cope with "invalid WooCommerce products"
|
1979 |
+
RSS dashboard on WP-admin not showing when RSS feed cannot be retrieved
|
1980 |
+
|
1981 |
+
= 5.5.9 =
|
1982 |
+
Added the "add to cart link" attribute
|
1983 |
+
|
1984 |
+
= 5.5.8 =
|
1985 |
+
Added link to feed location on manage feeds page
|
1986 |
+
|
1987 |
+
= 5.5.7 =
|
1988 |
+
Fixed bugs in Google's product review feed nodes
|
1989 |
+
|
1990 |
+
= 5.5.6 =
|
1991 |
+
Removed spaces in prefix and suffix for SKU attribute
|
1992 |
+
|
1993 |
+
= 5.5.5 =
|
1994 |
+
On popular demand added the availability of a wc_post_id_product_id attribute for Facebook feeds
|
1995 |
+
|
1996 |
+
= 5.5.4 =
|
1997 |
+
Fixed a bug where the identifier nodes in the Google Product Review feeds were not complete. This issue has been fixed now.
|
1998 |
+
|
1999 |
+
= 5.5.3 =
|
2000 |
+
Users that created a custom feed and had deleted products in their database reported on empty product nodes. This release attempts to fix that issue.
|
2001 |
+
|
2002 |
+
= 5.5.2 =
|
2003 |
+
Fixed a PHP warning that showed when using the Aelia currency switcher
|
2004 |
+
|
2005 |
+
= 5.5.1 =
|
2006 |
+
Added links to support pages
|
2007 |
+
|
2008 |
+
= 5.5.0 =
|
2009 |
+
Checked for WordPress 5.2 compatibility
|
2010 |
+
|
2011 |
+
= 5.4.9 =
|
2012 |
+
Fixed a PHP warning that showed after processing of Yandex feeds
|
2013 |
+
|
2014 |
+
= 5.4.8 =
|
2015 |
+
Fixed support for Cyrillic characters in the Yandex PARAM field
|
2016 |
+
Removed the Yandex platform node from the YML as it is no longer an accepted field for Yandex
|
2017 |
+
|
2018 |
+
= 5.4.7 =
|
2019 |
+
Changed the XML header of the Heureka.cz template
|
2020 |
+
|
2021 |
+
= 5.4.6 =
|
2022 |
+
Fixed support for rightpress
|
2023 |
+
|
2024 |
+
= 5.4.5 =
|
2025 |
+
Cleaned the filter and rule drop-downs. Removed the replace option as that is not fully functioning yet.
|
2026 |
+
|
2027 |
+
= 5.4.4 =
|
2028 |
+
Re-arranged some of the attributes in the drop-down in order for the important attributes to show above the (long) list of custom attributes
|
2029 |
+
|
2030 |
+
= 5.4.3 =
|
2031 |
+
Solved the same bug again: products that had only one review did not end up in Google's Product Review Feed. This issue has been fixed now.
|
2032 |
+
|
2033 |
+
= 5.4.2 =
|
2034 |
+
Change to Google Product Review Feed: names need to be shorten (anonymous)
|
2035 |
+
|
2036 |
+
= 5.4.1 =
|
2037 |
+
Solved a bug: products that had only one review did not end up in Google's Product Review Feed. This issue has been fixed now.
|
2038 |
+
|
2039 |
+
= 5.4.0 =
|
2040 |
+
Solved a PHP warning that showed for some users when setting-up a feed.
|
2041 |
+
|
2042 |
+
= 5.3.9 =
|
2043 |
+
Solved a PHP warning that showed on the feed settings page when all feeds were deleted
|
2044 |
+
Changed texts in the review notification
|
2045 |
+
|
2046 |
+
= 5.3.8 =
|
2047 |
+
Tested compatibility for WooCommerce 3.6
|
2048 |
+
Added the "on backorder" support for the availability attribute
|
2049 |
+
Solved a bug where in some browsers field mappings could not be added or deleted
|
2050 |
+
|
2051 |
+
= 5.3.7 =
|
2052 |
+
Solved a conflict with the Yoast SEO plugin where the category path was empty for some products.
|
2053 |
+
|
2054 |
+
= 5.3.6 =
|
2055 |
+
We have added 5 custom fields (_woosea_custom_field_0 to 5) that can be used for adding product information to feeds
|
2056 |
+
Google added new attributes that can be used in Google Shopping: installment and subscription cost. We have added those to the Google Shopping template
|
2057 |
+
|
2058 |
+
= 5.3.5 =
|
2059 |
+
Products that are on back-order will now have the availability status "out of stock" whereas previously they were shown as being "on stock"
|
2060 |
+
|
2061 |
+
= 5.3.4 =
|
2062 |
+
Fixed a bug in the category mapping for level-3 categories. When those categories were mapped to a Google category they did not show in the product feed. This has been fixed now.
|
2063 |
+
|
2064 |
+
= 5.3.3 =
|
2065 |
+
General clean-up of code
|
2066 |
+
Changed batch size for product feeds over 50.000 products
|
2067 |
+
|
2068 |
+
= 5.3.2 =
|
2069 |
+
Fixed a bug in filters for product tags
|
2070 |
+
|
2071 |
+
= 5.3.1 =
|
2072 |
+
Added support for adding parameters to the link attribute for CSV feeds
|
2073 |
+
|
2074 |
+
= 5.3.0 =
|
2075 |
+
Solved some PHP warnings that were showing when configuring a CSV feed with Aelia currencies in it
|
2076 |
+
Added support for adding parameters to the link attribute for CSV feeds
|
2077 |
+
|
2078 |
+
= 5.2.9 =
|
2079 |
+
Added some extra allowed characters (% and ,) in the Yandex PARAM XML node
|
2080 |
+
Added the review_url field to Google Product Review feeds
|
2081 |
+
Fixed the review_timestamp format for Google Product Review feeds
|
2082 |
+
|
2083 |
+
= 5.2.8 =
|
2084 |
+
Fixed a bug in the Google Product Review feed where the min/max rating values were wrong.
|
2085 |
+
|
2086 |
+
= 5.2.7 =
|
2087 |
+
Added support for the official WooCommerce Product Bundles (https://woocommerce.com/products/product-bundles/)
|
2088 |
+
|
2089 |
+
= 5.2.6 =
|
2090 |
+
Added the "is promotion" attribute for Google Merchant Promotion feeds
|
2091 |
+
|
2092 |
+
= 5.2.5 =
|
2093 |
+
Fixed a category mapping issue. The preg match was matching too many results, mainly accessories
|
2094 |
+
|
2095 |
+
= 5.2.4 =
|
2096 |
+
Fixed another exotic category mapping issue that occured when users left some category mappings blank
|
2097 |
+
|
2098 |
+
= 5.2.3 =
|
2099 |
+
Fixed a bug: plugin was added main category names to a category mapping, even when that main category was not active for a product. This caused unexpected category mappings in product feeds. This has been solved now.
|
2100 |
+
|
2101 |
+
= 5.2.2 =
|
2102 |
+
Added support for usage of whitespaces in the so-called PARAM_ nodes for Yandex, Zbozi and Heureka feeds.
|
2103 |
+
|
2104 |
+
= 5.2.1 =
|
2105 |
+
Reverted back some of the rule fixes from the previous release as it caused non Google feeds to become empty
|
2106 |
+
|
2107 |
+
= 5.2.0 =
|
2108 |
+
Fixed a Pinterest bug, templare was not loading
|
2109 |
+
Fixed rules that were created on Google category attributes
|
2110 |
+
|
2111 |
+
= 5.1.9 =
|
2112 |
+
Added support for Pinterest, our plugin now contains a default template for it
|
2113 |
+
|
2114 |
+
= 5.1.8 =
|
2115 |
+
Added support for Google Product Review feeds
|
2116 |
+
|
2117 |
+
= 5.1.7 =
|
2118 |
+
Added support for Cyrrilic characters in PARAM_ parameters for Yandex, Zbozi and Heureka feeds.
|
2119 |
+
|
2120 |
+
= 5.1.6 =
|
2121 |
+
Build in another check for when users add a variable product to their product feed that isn't really a variable product. This caused the plugin to get stuck when processing product feeds.
|
2122 |
+
|
2123 |
+
= 5.1.5 =
|
2124 |
+
Build in a check for when users add a variable product to their product feed that isn't really a variable product. This caused the plugin to get stuck when processing product feeds.
|
2125 |
+
|
2126 |
+
= 5.1.4 =
|
2127 |
+
Added PARAM support for Yandex feeds
|
2128 |
+
|
2129 |
+
= 5.1.3 =
|
2130 |
+
Added PARAM support for Zbozi.cz and Heureka.cz product feeds
|
2131 |
+
|
2132 |
+
= 5.1.2 =
|
2133 |
+
New powerful feature: product data manipulation. Combine different fields and attributes to one piece of product data to improve the quality of your product feeds
|
2134 |
+
Fixed some PHP warnings that showed upon activation of the plugin
|
2135 |
+
Fixed naming of Ricardo.ch
|
2136 |
+
Added Ricarco.ch template
|
2137 |
+
|
2138 |
+
= 5.1.1 =
|
2139 |
+
Added support for named attributes for Zbozi.ch and Heureka.cz
|
2140 |
+
Fixed an issue where comparisons on numeric numbers bigger than 1000 did not work
|
2141 |
+
|
2142 |
+
= 5.1.0 =
|
2143 |
+
Fixed a bug where category mappings that contained apastrophe were not saved. This issue has been fixed now.
|
2144 |
+
|
2145 |
+
= 5.0.9 =
|
2146 |
+
Fixed an issue where empty rules on product descriptions contained only shortcodes did not work
|
2147 |
+
|
2148 |
+
= 5.0.8 =
|
2149 |
+
Fixed a PHP warning that showed in the logs when a than-rule was set on an empty or non-excisiting attribute
|
2150 |
+
|
2151 |
+
= 5.0.7 =
|
2152 |
+
Added 6 new fields to the product edit pages which you can use for your product feeds: cost of good sold, multipack, is bundle, energy efficiency class, minimum energy efficiency class and maximum energy efficiency class
|
2153 |
+
|
2154 |
+
= 5.0.6 =
|
2155 |
+
Fixed another priceValidUntil structured data markup issue
|
2156 |
+
|
2157 |
+
= 5.0.5 =
|
2158 |
+
Fixed a bug when enabling the select default variant only option
|
2159 |
+
|
2160 |
+
= 5.0.4 =
|
2161 |
+
Added priceValidUntil and url structured data mark-up to default WooCommerce structured data and added it to the structured data markup feature of this plugin
|
2162 |
+
|
2163 |
+
= 5.0.3 =
|
2164 |
+
Fixed another YML bug for Yandex (shop node was misplaced).
|
2165 |
+
|
2166 |
+
= 5.0.2 =
|
2167 |
+
Fixed a bug for Yandex and Zap.co.il feeds where XML nodes were put in multiple times.
|
2168 |
+
|
2169 |
+
= 5.0.1 =
|
2170 |
+
Added the age_group input field on product edit pages
|
2171 |
+
|
2172 |
= 5.0.0 =
|
2173 |
Fixed a PHP undefined variable warning
|
2174 |
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version:
|
5 |
* Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
|
6 |
* Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
|
7 |
* Author: AdTribes.io
|
@@ -11,13 +11,13 @@
|
|
11 |
* License: GPL3
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
13 |
* Requires at least: 4.5
|
14 |
-
* Tested up to: 5.
|
15 |
*
|
16 |
* Text Domain: woo-product-feed-pro
|
17 |
* Domain Path: /languages
|
18 |
*
|
19 |
* WC requires at least: 3.0
|
20 |
-
* WC tested up to: 3.
|
21 |
*
|
22 |
* Product Feed PRO for WooCommerce is free software: you can redistribute it and/or modify
|
23 |
* it under the terms of the GNU General Public License as published by
|
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
|
|
48 |
* Plugin versionnumber, please do not override.
|
49 |
* Define some constants
|
50 |
*/
|
51 |
-
define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
@@ -68,7 +68,6 @@ if ( ! defined( 'WOOCOMMERCESEA_PLUGIN_URL' ) ) {
|
|
68 |
define( 'WOOCOMMERCESEA_PLUGIN_URL', plugins_url() . '/' . WOOCOMMERCESEA_PLUGIN_NAME_SHORT );
|
69 |
}
|
70 |
|
71 |
-
|
72 |
/**
|
73 |
* Enqueue css assets
|
74 |
*/
|
@@ -88,7 +87,6 @@ add_action( 'admin_enqueue_scripts' , 'woosea_styles' );
|
|
88 |
* Enqueue js assets
|
89 |
*/
|
90 |
function woosea_scripts($hook) {
|
91 |
-
|
92 |
// Enqueue Jquery
|
93 |
wp_enqueue_script('jquery');
|
94 |
wp_enqueue_script('jquery-ui-dialog');
|
@@ -127,18 +125,26 @@ function woosea_scripts($hook) {
|
|
127 |
// JS for getting channels
|
128 |
wp_register_script( 'woosea_channel-js', plugin_dir_url( __FILE__ ) . 'js/woosea_channel.js', '',WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
129 |
wp_enqueue_script( 'woosea_channel-js' );
|
130 |
-
|
131 |
-
// JS for manage projects page
|
132 |
-
wp_register_script( 'woosea_manage-js', plugin_dir_url( __FILE__ ) . 'js/woosea_manage.js', '',WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
133 |
-
wp_enqueue_script( 'woosea_manage-js' );
|
134 |
-
|
135 |
// JS for managing keys
|
136 |
wp_register_script( 'woosea_key-js', plugin_dir_url( __FILE__ ) . 'js/woosea_key.js', '',WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
137 |
wp_enqueue_script( 'woosea_key-js' );
|
138 |
}
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
add_action( 'admin_enqueue_scripts' , 'woosea_scripts' );
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
/**
|
143 |
* Required classes
|
144 |
*/
|
@@ -162,11 +168,10 @@ function woosea_plugin_action_links($links, $file) {
|
|
162 |
|
163 |
// check to make sure we are on the correct plugin
|
164 |
if ($file == $this_plugin) {
|
165 |
-
|
166 |
// link to what ever you want
|
167 |
$host = $_SERVER['HTTP_HOST'];
|
168 |
$plugin_links[] = '<a href="https://adtribes.io/support/?utm_source='.$host.'&utm_medium=pluginpage&utm_campaign=support" target="_blank">Support</a>';
|
169 |
-
$plugin_links[] = '<a href="https://adtribes.io/
|
170 |
|
171 |
$license_information = get_option( 'license_information' );
|
172 |
if($license_information['license_valid'] <> "true"){
|
@@ -206,15 +211,21 @@ function woosea_add_remarketing_tags( $product = null ){
|
|
206 |
// We should first check if there are any _GET parameters available
|
207 |
// When there are not we are on a variable product page but not on a specific variable one
|
208 |
// In that case we need to put in the AggregateOffer structured data
|
209 |
-
|
210 |
$variation_id = woosea_find_matching_product_variation( $product, $_GET );
|
211 |
$nr_get = count($_GET);
|
212 |
|
213 |
if($nr_get > 0){
|
214 |
$variable_product = wc_get_product($variation_id);
|
215 |
-
|
|
|
|
|
|
|
|
|
216 |
if(is_object( $variable_product ) ) {
|
217 |
-
$product_price = $variable_product->
|
|
|
|
|
|
|
218 |
$ecomm_price = $product_price;
|
219 |
} else {
|
220 |
// AggregateOffer
|
@@ -246,11 +257,10 @@ function woosea_add_remarketing_tags( $product = null ){
|
|
246 |
$ecomm_price = wc_format_decimal( $product->get_price(), wc_get_price_decimals() );
|
247 |
}
|
248 |
}
|
249 |
-
|
250 |
?>
|
251 |
<script type="text/javascript">
|
252 |
var google_tag_params = {
|
253 |
-
ecomm_prodid:
|
254 |
ecomm_pagetype: '<?php print "$ecomm_pagetype";?>',
|
255 |
ecomm_totalvalue: <?php print "$ecomm_price";?>,
|
256 |
};
|
@@ -352,14 +362,14 @@ function woosea_license_notice(){
|
|
352 |
}
|
353 |
add_action('admin_notices', 'woosea_license_notice');
|
354 |
|
355 |
-
|
356 |
/**
|
357 |
* Request our plugin users to write a review
|
358 |
**/
|
359 |
function woosea_request_review(){
|
360 |
// Only request for a review when:
|
361 |
// Plugin activation has been > 1 week
|
362 |
-
// Active projects > 0
|
|
|
363 |
$cron_projects = get_option( 'cron_projects' );
|
364 |
if(!empty( $cron_projects )){
|
365 |
$nr_projects = count($cron_projects);
|
@@ -370,12 +380,14 @@ function woosea_request_review(){
|
|
370 |
$is_active = $current_time-$first_activation;
|
371 |
$page = basename($_SERVER['REQUEST_URI']);
|
372 |
|
373 |
-
if (preg_match("/woo-product-feed-pro|woosea_manage_feed|woosea_manage_settings/i",$page)){
|
374 |
|
375 |
if(($nr_projects > 0) AND ($is_active > $show_after) AND ($notification_interaction != "yes")){
|
376 |
-
echo '<div class="notice notice-info review-notification is-dismissible"
|
|
|
|
|
377 |
}
|
378 |
-
}
|
379 |
}
|
380 |
}
|
381 |
add_action('admin_notices', 'woosea_request_review');
|
@@ -415,15 +427,6 @@ register_activation_hook(__FILE__, 'woosea_create_db_table');
|
|
415 |
function woosea_hook_header() {
|
416 |
$marker = sprintf('<!-- This website runs the Product Feed PRO for WooCommerce by AdTribes.io plugin -->');
|
417 |
echo "\n${marker}\n";
|
418 |
-
|
419 |
-
// Make ajaxurl available on all pages
|
420 |
-
// echo '<script type="text/javascript">
|
421 |
-
// var ajaxurl = "' . admin_url('admin-ajax.php') . '";
|
422 |
-
// </script>';
|
423 |
-
|
424 |
-
// JS for adding the tracking code into the template
|
425 |
-
// wp_register_script( 'woosea_tracking-js', plugin_dir_url( __FILE__ ) . 'js/woosea_tracking.js', WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
426 |
-
// wp_enqueue_script( 'woosea_tracking-js' );
|
427 |
}
|
428 |
add_action('wp_head','woosea_hook_header');
|
429 |
|
@@ -458,14 +461,14 @@ add_action( 'woosea_check_license', 'woosea_license_valid'); // check if license
|
|
458 |
* Add WooCommerce SEA plugin to Menu
|
459 |
*/
|
460 |
function woosea_menu_addition(){
|
461 |
-
add_menu_page(__('Product Feed PRO for WooCommerce', '
|
462 |
-
add_submenu_page(__FILE__, __('Feed configuration', '
|
463 |
-
add_submenu_page(__FILE__, __('Manage feeds', '
|
464 |
-
add_submenu_page(__FILE__, __('Settings', '
|
465 |
|
466 |
$license_information = get_option( 'license_information' );
|
467 |
if($license_information['license_valid'] <> "true"){
|
468 |
-
add_submenu_page(__FILE__, __('Upgrade to Elite', '
|
469 |
}
|
470 |
}
|
471 |
|
@@ -664,6 +667,7 @@ function woosea_register_license(){
|
|
664 |
delete_option ('structured_vat');
|
665 |
delete_option ('add_unique_identifiers');
|
666 |
delete_option ('add_wpml_support');
|
|
|
667 |
delete_option ('add_aelia_support');
|
668 |
}
|
669 |
|
@@ -695,15 +699,12 @@ function woosea_find_matching_product_variation( $product, $attributes ) {
|
|
695 |
|
696 |
if( class_exists('WC_Data_Store') ) {
|
697 |
$data_store = WC_Data_Store::load( 'product' );
|
698 |
-
|
699 |
-
// return ( new \WC_Product_Data_Store_CPT() )->find_matching_product_variation(new \WC_Product( $product ),$attributes);
|
700 |
return $data_store->find_matching_product_variation( $product, $attributes );
|
701 |
} else {
|
702 |
return $product->get_matching_variation( $attributes );
|
703 |
}
|
704 |
}
|
705 |
|
706 |
-
|
707 |
/**
|
708 |
* Remove the price from the JSON-LD on variant product pages
|
709 |
* As WooCommerce shows the wrong price and it causes items
|
@@ -743,7 +744,10 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
743 |
|
744 |
// if ( '' !== $product->get_regular_price() ) {
|
745 |
$product_id = get_the_id();
|
746 |
-
|
|
|
|
|
|
|
747 |
// Get product condition
|
748 |
$condition = ucfirst( get_post_meta( $product_id, '_woosea_condition', true ) );
|
749 |
|
@@ -752,6 +756,9 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
752 |
} else {
|
753 |
$json_condition = $condition."Condition";
|
754 |
}
|
|
|
|
|
|
|
755 |
|
756 |
if ( $product->is_type( 'variable' ) ) {
|
757 |
// We should first check if there are any _GET parameters available
|
@@ -774,14 +781,27 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
774 |
}
|
775 |
}
|
776 |
$variable_product = wc_get_product($variation_id);
|
777 |
-
|
778 |
if(is_object( $variable_product ) ) {
|
779 |
-
// Structured data error here, it ignores VAT when prices has been entered without VAT
|
780 |
-
|
781 |
$qty = 1;
|
782 |
$product_price = wc_get_price_to_display($variable_product, array('qty' => $qty));
|
783 |
$tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
|
784 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
785 |
// Workaround for price caching issues
|
786 |
if(!empty($tax_rates)){
|
787 |
foreach ($tax_rates as $tk => $tv){
|
@@ -803,8 +823,12 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
803 |
$product_price = wc_get_price_excluding_tax($variable_product,array('price'=> $variable_product->get_price())) * (100+$tax_rates[1]['rate'])/100;
|
804 |
$product_price = round($product_price, 2);
|
805 |
|
|
|
|
|
|
|
806 |
// Get product condition
|
807 |
$condition = ucfirst( get_post_meta( $variation_id, '_woosea_condition', true ) );
|
|
|
808 |
if(!$condition){
|
809 |
$json_condition = "NewCondition";
|
810 |
} else {
|
@@ -818,22 +842,27 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
818 |
} else {
|
819 |
$availability = "InStock";
|
820 |
}
|
|
|
|
|
|
|
|
|
821 |
|
822 |
$markup_offer = array(
|
823 |
-
'@type'
|
824 |
-
'price'
|
825 |
-
|
826 |
-
'
|
827 |
-
'
|
828 |
-
'
|
829 |
-
'
|
830 |
-
'
|
831 |
-
'
|
832 |
-
|
833 |
-
'
|
834 |
-
'
|
|
|
835 |
),
|
836 |
-
'url'
|
837 |
);
|
838 |
} else {
|
839 |
// AggregateOffer
|
@@ -846,7 +875,7 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
846 |
'@type' => 'Offer',
|
847 |
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
848 |
'priceCurrency' => $shop_currency,
|
849 |
-
'itemCondition' => '
|
850 |
'availability' => 'https://schema.org/' . $stock = ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
851 |
'sku' => $product->get_sku(),
|
852 |
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
@@ -864,7 +893,7 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
864 |
'lowPrice' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
865 |
'highPrice' => wc_format_decimal( $highest, wc_get_price_decimals() ),
|
866 |
'priceCurrency' => $shop_currency,
|
867 |
-
'itemCondition' => '
|
868 |
'availability' => 'https://schema.org/' . $stock = ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
869 |
'sku' => $product->get_sku(),
|
870 |
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
@@ -923,11 +952,15 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
923 |
$product_price = wc_get_price_excluding_tax($product,array('price'=> $product->get_price())) * (100+$tax_rates[1]['rate'])/100;
|
924 |
$product_price = round($product_price, 2);
|
925 |
|
|
|
|
|
|
|
926 |
$markup_offer = array(
|
927 |
'@type' => 'Offer',
|
928 |
'price' => $product_price,
|
|
|
929 |
'priceCurrency' => $shop_currency,
|
930 |
-
'itemCondition' => '
|
931 |
'availability' => 'https://schema.org/' . $stock = ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
932 |
'sku' => $product->get_sku(),
|
933 |
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
@@ -945,7 +978,9 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
945 |
// Just use the old WooCommerce buggy setting
|
946 |
if ( '' !== $product->get_price() ) {
|
947 |
|
948 |
-
|
|
|
|
|
949 |
$prices = $product->get_variation_prices();
|
950 |
$lowest = reset( $prices['price'] );
|
951 |
$highest = end( $prices['price'] );
|
@@ -955,6 +990,7 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
955 |
$markup_offer = array(
|
956 |
'@type' => 'Offer',
|
957 |
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
|
|
958 |
'priceCurrency' => $shop_currency,
|
959 |
);
|
960 |
|
@@ -964,6 +1000,7 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
964 |
'@type' => 'AggregateOffer',
|
965 |
'lowPrice' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
966 |
'highPrice' => wc_format_decimal( $highest, wc_get_price_decimals() ),
|
|
|
967 |
'priceCurrency' => $shop_currency,
|
968 |
'availability' => 'https://schema.org/' . ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
969 |
'seller' => array(
|
@@ -974,12 +1011,19 @@ function woosea_product_delete_meta_price( $product = null ) {
|
|
974 |
);
|
975 |
}
|
976 |
} else {
|
|
|
|
|
|
|
|
|
|
|
977 |
$markup_offer = array(
|
978 |
'@type' => 'Offer',
|
979 |
'price' => wc_format_decimal( $product->get_price(), wc_get_price_decimals() ),
|
|
|
980 |
'priceCurrency' => $shop_currency,
|
981 |
'availability' => 'https://schema.org/' . ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
982 |
-
|
|
|
983 |
'@type' => 'Organization',
|
984 |
'name' => $shop_name,
|
985 |
'url' => $shop_url,
|
@@ -1224,9 +1268,6 @@ function woosea_add_attributes() {
|
|
1224 |
$attribute_value = sanitize_text_field($_POST['attribute_value']);
|
1225 |
$active = sanitize_text_field($_POST['active']);
|
1226 |
|
1227 |
-
// unset($extra_attributes);
|
1228 |
-
// delete_option('woosea_extra_attributes');
|
1229 |
-
|
1230 |
if(!get_option( 'woosea_extra_attributes' )){
|
1231 |
if($active == "true"){
|
1232 |
$extra_attributes = array(
|
@@ -1332,6 +1373,21 @@ function woosea_structured_vat (){
|
|
1332 |
}
|
1333 |
add_action( 'wp_ajax_woosea_structured_vat', 'woosea_structured_vat' );
|
1334 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1335 |
/**
|
1336 |
* This function enables the setting to add
|
1337 |
* WPML support
|
@@ -1377,6 +1433,21 @@ function woosea_add_mother_image (){
|
|
1377 |
}
|
1378 |
add_action( 'wp_ajax_woosea_add_mother_image', 'woosea_add_mother_image' );
|
1379 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1380 |
/**
|
1381 |
* This function enables the setting to add
|
1382 |
* Google's Dynamic Remarketing
|
@@ -1406,31 +1477,6 @@ function woosea_add_identifiers (){
|
|
1406 |
}
|
1407 |
add_action( 'wp_ajax_woosea_add_identifiers', 'woosea_add_identifiers' );
|
1408 |
|
1409 |
-
|
1410 |
-
/**
|
1411 |
-
* Add a title tab.
|
1412 |
-
*/
|
1413 |
-
//add_filter( 'woocommerce_product_data_tabs', 'woosea_custom_product_tab', 10, 1 );
|
1414 |
-
|
1415 |
-
function woosea_custom_product_tab( $default_tabs ) {
|
1416 |
-
$default_tabs['custom_tab'] = array(
|
1417 |
-
'label' => __( 'AdTribes.io Product Title', 'domain' ),
|
1418 |
-
'target' => 'woosea_title_tab_data',
|
1419 |
-
'priority' => 15,
|
1420 |
-
'class' => array()
|
1421 |
-
);
|
1422 |
-
return $default_tabs;
|
1423 |
-
}
|
1424 |
-
|
1425 |
-
//add_action( 'woocommerce_product_data_panels', 'woosea_title_tab_data' );
|
1426 |
-
|
1427 |
-
function woosea_title_tab_data() {
|
1428 |
-
echo '<div id="woosea_title_tab_data" class="panel woocommerce_options_panel">';
|
1429 |
-
echo 'blat';
|
1430 |
-
echo '</div>';
|
1431 |
-
}
|
1432 |
-
|
1433 |
-
|
1434 |
/**
|
1435 |
* This function add the actual fields to the edit product page for single products
|
1436 |
* identifiers GTIN, MPN, EAN, UPC, Brand and Condition
|
@@ -1524,6 +1570,80 @@ function woosea_custom_general_fields() {
|
|
1524 |
)
|
1525 |
);
|
1526 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1527 |
// Unit pricing measure Field
|
1528 |
woocommerce_wp_text_input(
|
1529 |
array(
|
@@ -1560,7 +1680,171 @@ function woosea_custom_general_fields() {
|
|
1560 |
'id' => '_woosea_installment_amount',
|
1561 |
'label' => __( 'Installment amount', 'woocommerce' ),
|
1562 |
'desc_tip' => 'true',
|
1563 |
-
'description' => __( 'Enter the amount the
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1564 |
)
|
1565 |
);
|
1566 |
|
@@ -1583,17 +1867,36 @@ add_action( 'woocommerce_product_options_general_product_data', 'woosea_custom_g
|
|
1583 |
* This function saves the input from the extra fields on the single product edit page
|
1584 |
*/
|
1585 |
function woosea_save_custom_general_fields($post_id){
|
1586 |
-
$woocommerce_brand
|
1587 |
-
$woocommerce_gtin
|
1588 |
-
$woocommerce_upc
|
1589 |
-
$woocommerce_mpn
|
1590 |
-
$woocommerce_ean
|
1591 |
-
$woocommerce_title
|
1592 |
-
$
|
1593 |
-
$
|
1594 |
-
$
|
1595 |
-
$
|
1596 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1597 |
if(!empty($_POST['_woosea_exclude_product'])){
|
1598 |
$woocommerce_exclude_product = sanitize_text_field($_POST['_woosea_exclude_product']);
|
1599 |
} else {
|
@@ -1615,6 +1918,21 @@ function woosea_save_custom_general_fields($post_id){
|
|
1615 |
if(isset($woocommerce_gtin))
|
1616 |
update_post_meta( $post_id, '_woosea_gtin', esc_attr($woocommerce_gtin));
|
1617 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1618 |
if(isset($woocommerce_title))
|
1619 |
update_post_meta( $post_id, '_woosea_optimized_title', $woocommerce_title);
|
1620 |
|
@@ -1627,6 +1945,9 @@ function woosea_save_custom_general_fields($post_id){
|
|
1627 |
if(isset($woocommerce_condition))
|
1628 |
update_post_meta( $post_id, '_woosea_condition', $woocommerce_condition);
|
1629 |
|
|
|
|
|
|
|
1630 |
if(isset($woocommerce_installment_months))
|
1631 |
update_post_meta( $post_id, '_woosea_installment_months', esc_attr($woocommerce_installment_months));
|
1632 |
|
@@ -1635,6 +1956,42 @@ function woosea_save_custom_general_fields($post_id){
|
|
1635 |
|
1636 |
if(isset($woocommerce_exclude_product))
|
1637 |
update_post_meta( $post_id, '_woosea_exclude_product', esc_attr($woocommerce_exclude_product));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1638 |
}
|
1639 |
add_action( 'woocommerce_process_product_meta', 'woosea_save_custom_general_fields' );
|
1640 |
|
@@ -1711,6 +2068,77 @@ function woosea_custom_variable_fields( $loop, $variation_id, $variation ) {
|
|
1711 |
)
|
1712 |
);
|
1713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1714 |
// Variation Unit pricing measure field
|
1715 |
woocommerce_wp_text_input(
|
1716 |
array(
|
@@ -1796,6 +2224,227 @@ function woosea_custom_variable_fields( $loop, $variation_id, $variation ) {
|
|
1796 |
)
|
1797 |
);
|
1798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1799 |
// Exclude product from feed
|
1800 |
woocommerce_wp_checkbox(
|
1801 |
array(
|
@@ -1865,6 +2514,41 @@ function woosea_save_custom_variable_fields( $post_id ) {
|
|
1865 |
update_post_meta( $variation_id, '_woosea_gtin', stripslashes( sanitize_text_field( $_gtin[$i] )));
|
1866 |
}
|
1867 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1868 |
// Unit pricing measure Field
|
1869 |
$_pricing_measure = $_POST['_woosea_variable_unit_pricing_measure'];
|
1870 |
$variation_id = (int) $variable_post_id[$i];
|
@@ -1907,6 +2591,98 @@ function woosea_save_custom_variable_fields( $post_id ) {
|
|
1907 |
update_post_meta( $variation_id, '_woosea_condition', stripslashes( sanitize_text_field( $_condition[$i] )));
|
1908 |
}
|
1909 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1910 |
// Exclude product from feed
|
1911 |
if(empty($_POST['_woosea_exclude_product'])){
|
1912 |
$_excludeproduct[$i] = "no";
|
@@ -1945,7 +2721,9 @@ function woosea_update_project_history($project_hash){
|
|
1945 |
$xml = simplexml_load_file($file, 'SimpleXMLElement', LIBXML_NOCDATA);
|
1946 |
|
1947 |
if($project['name'] == "Yandex"){
|
1948 |
-
|
|
|
|
|
1949 |
} else {
|
1950 |
if ($project['taxonomy'] == "none"){
|
1951 |
$nr_products = count($xml->product);
|
@@ -1977,7 +2755,6 @@ function woosea_update_project_history($project_hash){
|
|
1977 |
}
|
1978 |
add_action( 'woosea_update_project_stats', 'woosea_update_project_history',1,1 );
|
1979 |
|
1980 |
-
|
1981 |
/**
|
1982 |
* Get the attribute mapping helptexts
|
1983 |
*/
|
@@ -2049,7 +2826,6 @@ function woosea_fieldmapping_dialog_helptext(){
|
|
2049 |
}
|
2050 |
add_action( 'wp_ajax_woosea_fieldmapping_dialog_helptext', 'woosea_fieldmapping_dialog_helptext' );
|
2051 |
|
2052 |
-
|
2053 |
/**
|
2054 |
* Get the dropdowns for the fieldmapping page
|
2055 |
*/
|
@@ -2175,7 +2951,6 @@ add_action( 'wp_ajax_woosea_autocomplete_mapping', 'woosea_autocomplete_mapping'
|
|
2175 |
* Some cases are left blank for future steps and pages in the configurations process
|
2176 |
*/
|
2177 |
function woosea_generate_pages(){
|
2178 |
-
|
2179 |
/**
|
2180 |
* Since WP 4.99 form elements are no longer allowed tags for non-admin users
|
2181 |
* With the function below we add the form elements again to the allowed tags
|
@@ -2324,6 +3099,9 @@ function woosea_generate_pages(){
|
|
2324 |
case 8:
|
2325 |
load_template( plugin_dir_path( __FILE__ ) . '/pages/admin/woosea-statistics-feed.php' );
|
2326 |
break;
|
|
|
|
|
|
|
2327 |
case 100:
|
2328 |
load_template( plugin_dir_path( __FILE__ ) . '/pages/admin/woosea-manage-feed.php' );
|
2329 |
break;
|
@@ -2356,7 +3134,7 @@ function woosea_license_valid(){
|
|
2356 |
$license_information = get_option('license_information');
|
2357 |
|
2358 |
$curl = curl_init();
|
2359 |
-
$url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=
|
2360 |
|
2361 |
curl_setopt_array($curl, array(
|
2362 |
CURLOPT_RETURNTRANSFER => 1,
|
@@ -2386,6 +3164,7 @@ function woosea_license_valid(){
|
|
2386 |
delete_option ('structured_data_fix');
|
2387 |
delete_option ('add_unique_identifiers');
|
2388 |
delete_option ('add_wpml_support');
|
|
|
2389 |
delete_option ('add_aelia_support');
|
2390 |
} else {
|
2391 |
if(empty($json_return)){
|
@@ -2644,7 +3423,7 @@ function woosea_continue_batch($project_hash){
|
|
2644 |
$batch_project = "batch_project_".$project_hash;
|
2645 |
$val = get_option( $batch_project );
|
2646 |
|
2647 |
-
if (!empty($val)){
|
2648 |
$line = new WooSEA_Get_Products;
|
2649 |
$final_creation = $line->woosea_get_products( $val );
|
2650 |
$last_updated = woosea_last_updated( $val['project_hash'] );
|
@@ -2707,8 +3486,7 @@ add_action( 'admin_menu' , 'woosea_menu_addition' );
|
|
2707 |
function woosea_blog_widgets() {
|
2708 |
global $wp_meta_boxes;
|
2709 |
|
2710 |
-
add_meta_box('woosea_rss_dashboard_widget', __('Latest Product Feed Pro
|
2711 |
-
//wp_add_dashboard_widget('woosea_rss_dashboard_widget', __('Latest Product Feed Pro blog posts', 'rc_mdm'), 'woosea_my_rss_box');
|
2712 |
}
|
2713 |
add_action('wp_dashboard_setup', 'woosea_blog_widgets');
|
2714 |
|
@@ -2728,7 +3506,6 @@ function woosea_my_rss_box() {
|
|
2728 |
|
2729 |
// Loop through Feeds
|
2730 |
foreach ( $my_feeds as $feed) :
|
2731 |
-
|
2732 |
// Get a SimplePie feed object from the specified feed source.
|
2733 |
$rss = fetch_feed( $feed );
|
2734 |
|
@@ -2737,64 +3514,61 @@ function woosea_my_rss_box() {
|
|
2737 |
$rss_title = "";
|
2738 |
|
2739 |
if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly
|
2740 |
-
|
2741 |
-
|
2742 |
|
2743 |
-
|
2744 |
-
|
2745 |
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
|
2755 |
-
|
2756 |
-
|
2757 |
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
|
2767 |
-
|
2768 |
-
|
2769 |
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
endforeach; // End foreach feed
|
2797 |
}
|
2798 |
-
|
2799 |
-
|
2800 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
+
* Version: 6.0.0
|
5 |
* Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
|
6 |
* Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
|
7 |
* Author: AdTribes.io
|
11 |
* License: GPL3
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
13 |
* Requires at least: 4.5
|
14 |
+
* Tested up to: 5.2
|
15 |
*
|
16 |
* Text Domain: woo-product-feed-pro
|
17 |
* Domain Path: /languages
|
18 |
*
|
19 |
* WC requires at least: 3.0
|
20 |
+
* WC tested up to: 3.6
|
21 |
*
|
22 |
* Product Feed PRO for WooCommerce is free software: you can redistribute it and/or modify
|
23 |
* it under the terms of the GNU General Public License as published by
|
48 |
* Plugin versionnumber, please do not override.
|
49 |
* Define some constants
|
50 |
*/
|
51 |
+
define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '6.0.0' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
68 |
define( 'WOOCOMMERCESEA_PLUGIN_URL', plugins_url() . '/' . WOOCOMMERCESEA_PLUGIN_NAME_SHORT );
|
69 |
}
|
70 |
|
|
|
71 |
/**
|
72 |
* Enqueue css assets
|
73 |
*/
|
87 |
* Enqueue js assets
|
88 |
*/
|
89 |
function woosea_scripts($hook) {
|
|
|
90 |
// Enqueue Jquery
|
91 |
wp_enqueue_script('jquery');
|
92 |
wp_enqueue_script('jquery-ui-dialog');
|
125 |
// JS for getting channels
|
126 |
wp_register_script( 'woosea_channel-js', plugin_dir_url( __FILE__ ) . 'js/woosea_channel.js', '',WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
127 |
wp_enqueue_script( 'woosea_channel-js' );
|
128 |
+
|
|
|
|
|
|
|
|
|
129 |
// JS for managing keys
|
130 |
wp_register_script( 'woosea_key-js', plugin_dir_url( __FILE__ ) . 'js/woosea_key.js', '',WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
131 |
wp_enqueue_script( 'woosea_key-js' );
|
132 |
}
|
133 |
+
|
134 |
+
// JS for manage projects page
|
135 |
+
wp_register_script( 'woosea_manage-js', plugin_dir_url( __FILE__ ) . 'js/woosea_manage.js', '',WOOCOMMERCESEA_PLUGIN_VERSION, true );
|
136 |
+
wp_enqueue_script( 'woosea_manage-js' );
|
137 |
}
|
138 |
add_action( 'admin_enqueue_scripts' , 'woosea_scripts' );
|
139 |
|
140 |
+
/**
|
141 |
+
* Internationalisation of plugin
|
142 |
+
*/
|
143 |
+
function woosea_load_plugin_textdomain() {
|
144 |
+
load_plugin_textdomain( 'woosea', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
|
145 |
+
}
|
146 |
+
add_action( 'plugins_loaded', 'woosea_load_plugin_textdomain' );
|
147 |
+
|
148 |
/**
|
149 |
* Required classes
|
150 |
*/
|
168 |
|
169 |
// check to make sure we are on the correct plugin
|
170 |
if ($file == $this_plugin) {
|
|
|
171 |
// link to what ever you want
|
172 |
$host = $_SERVER['HTTP_HOST'];
|
173 |
$plugin_links[] = '<a href="https://adtribes.io/support/?utm_source='.$host.'&utm_medium=pluginpage&utm_campaign=support" target="_blank">Support</a>';
|
174 |
+
$plugin_links[] = '<a href="https://adtribes.io/tutorials/?utm_source='.$host.'&utm_medium=pluginpage&utm_campaign=tutorials" target="_blank">Tutorials</a>';
|
175 |
|
176 |
$license_information = get_option( 'license_information' );
|
177 |
if($license_information['license_valid'] <> "true"){
|
211 |
// We should first check if there are any _GET parameters available
|
212 |
// When there are not we are on a variable product page but not on a specific variable one
|
213 |
// In that case we need to put in the AggregateOffer structured data
|
|
|
214 |
$variation_id = woosea_find_matching_product_variation( $product, $_GET );
|
215 |
$nr_get = count($_GET);
|
216 |
|
217 |
if($nr_get > 0){
|
218 |
$variable_product = wc_get_product($variation_id);
|
219 |
+
|
220 |
+
// for variants use the variation_id and not the item_group_id
|
221 |
+
// otherwise Google will disapprove the items due to itemID mismatches
|
222 |
+
$ecomm_prodid = $variation_id;
|
223 |
+
|
224 |
if(is_object( $variable_product ) ) {
|
225 |
+
$product_price = $variable_product->get_price();
|
226 |
+
|
227 |
+
// ----- remove HTML TAGs -----
|
228 |
+
//$product_price = preg_replace ('/<[^>]*>/', ' ', $product_price);
|
229 |
$ecomm_price = $product_price;
|
230 |
} else {
|
231 |
// AggregateOffer
|
257 |
$ecomm_price = wc_format_decimal( $product->get_price(), wc_get_price_decimals() );
|
258 |
}
|
259 |
}
|
|
|
260 |
?>
|
261 |
<script type="text/javascript">
|
262 |
var google_tag_params = {
|
263 |
+
ecomm_prodid: <?php print "$ecomm_prodid";?>,
|
264 |
ecomm_pagetype: '<?php print "$ecomm_pagetype";?>',
|
265 |
ecomm_totalvalue: <?php print "$ecomm_price";?>,
|
266 |
};
|
362 |
}
|
363 |
add_action('admin_notices', 'woosea_license_notice');
|
364 |
|
|
|
365 |
/**
|
366 |
* Request our plugin users to write a review
|
367 |
**/
|
368 |
function woosea_request_review(){
|
369 |
// Only request for a review when:
|
370 |
// Plugin activation has been > 1 week
|
371 |
+
// Active projects > 0
|
372 |
+
|
373 |
$cron_projects = get_option( 'cron_projects' );
|
374 |
if(!empty( $cron_projects )){
|
375 |
$nr_projects = count($cron_projects);
|
380 |
$is_active = $current_time-$first_activation;
|
381 |
$page = basename($_SERVER['REQUEST_URI']);
|
382 |
|
383 |
+
// if (preg_match("/woo-product-feed-pro|woosea_manage_feed|woosea_manage_settings/i",$page)){
|
384 |
|
385 |
if(($nr_projects > 0) AND ($is_active > $show_after) AND ($notification_interaction != "yes")){
|
386 |
+
echo '<div class="notice notice-info review-notification is-dismissible">';
|
387 |
+
echo '<table><tr><td></td><td><font color="green" style="font-weight:normal";><p>Hey, I noticed you have been using our plugin, <u>Product Feed PRO for WooCommerce by AdTribes.io</u>, for over a week now and have created product feed projects with it - that\'s awesome! Could you please do Eva and me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation. We would greatly appreciate if you would do so :)<br/>~ Adtribes.io support team<br><ul><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="dismiss-review-notification">Ok, you deserve it</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">Nope, maybe later</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">I already did</a></li></ul></p></font></td></tr></table>';
|
388 |
+
echo '</div>';
|
389 |
}
|
390 |
+
// }
|
391 |
}
|
392 |
}
|
393 |
add_action('admin_notices', 'woosea_request_review');
|
427 |
function woosea_hook_header() {
|
428 |
$marker = sprintf('<!-- This website runs the Product Feed PRO for WooCommerce by AdTribes.io plugin -->');
|
429 |
echo "\n${marker}\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
}
|
431 |
add_action('wp_head','woosea_hook_header');
|
432 |
|
461 |
* Add WooCommerce SEA plugin to Menu
|
462 |
*/
|
463 |
function woosea_menu_addition(){
|
464 |
+
add_menu_page(__( 'Product Feed PRO for WooCommerce', 'woo-product-feed-pro' ), __( 'Product Feed Pro','woo-product-feed-pro' ), 'manage_options', __FILE__, 'woosea_generate_pages', esc_url( WOOCOMMERCESEA_PLUGIN_URL . '/images/icon-16x16.png'),99);
|
465 |
+
add_submenu_page(__FILE__, __( 'Feed configuration', 'woo-product-feed-pro' ), __( 'Create feed', 'woo-product-feed-pro' ), 'manage_options', __FILE__, 'woosea_generate_pages');
|
466 |
+
add_submenu_page(__FILE__, __( 'Manage feeds', 'woo-product-feed-pro' ), __( 'Manage feeds', 'woo-product-feed-pro' ), 'manage_options', 'woosea_manage_feed', 'woosea_manage_feed');
|
467 |
+
add_submenu_page(__FILE__, __( 'Settings', 'woo-product-feed-pro' ), __( 'Settings', 'woo-product-feed-pro' ), 'manage_options', 'woosea_manage_settings', 'woosea_manage_settings');
|
468 |
|
469 |
$license_information = get_option( 'license_information' );
|
470 |
if($license_information['license_valid'] <> "true"){
|
471 |
+
add_submenu_page(__FILE__, __( 'Upgrade to Elite', 'woo-product-feed' ), __( 'Upgrade to Elite', 'woo-product-feed-pro' ), 'manage_options', 'woosea_manage_settings&tab=woosea_license_check', 'woosea_upgrade_elite');
|
472 |
}
|
473 |
}
|
474 |
|
667 |
delete_option ('structured_vat');
|
668 |
delete_option ('add_unique_identifiers');
|
669 |
delete_option ('add_wpml_support');
|
670 |
+
delete_option ('add_manipulation_support');
|
671 |
delete_option ('add_aelia_support');
|
672 |
}
|
673 |
|
699 |
|
700 |
if( class_exists('WC_Data_Store') ) {
|
701 |
$data_store = WC_Data_Store::load( 'product' );
|
|
|
|
|
702 |
return $data_store->find_matching_product_variation( $product, $attributes );
|
703 |
} else {
|
704 |
return $product->get_matching_variation( $attributes );
|
705 |
}
|
706 |
}
|
707 |
|
|
|
708 |
/**
|
709 |
* Remove the price from the JSON-LD on variant product pages
|
710 |
* As WooCommerce shows the wrong price and it causes items
|
744 |
|
745 |
// if ( '' !== $product->get_regular_price() ) {
|
746 |
$product_id = get_the_id();
|
747 |
+
|
748 |
+
// Get product MPN
|
749 |
+
$mpn = get_post_meta( $product_id, '_woosea_mpn', true );
|
750 |
+
|
751 |
// Get product condition
|
752 |
$condition = ucfirst( get_post_meta( $product_id, '_woosea_condition', true ) );
|
753 |
|
756 |
} else {
|
757 |
$json_condition = $condition."Condition";
|
758 |
}
|
759 |
+
|
760 |
+
// Assume prices will be valid until the end of next year, unless on sale and there is an end date.
|
761 |
+
$price_valid_until = date( 'Y-12-31', current_time( 'timestamp', true ) + YEAR_IN_SECONDS );
|
762 |
|
763 |
if ( $product->is_type( 'variable' ) ) {
|
764 |
// We should first check if there are any _GET parameters available
|
781 |
}
|
782 |
}
|
783 |
$variable_product = wc_get_product($variation_id);
|
784 |
+
|
785 |
if(is_object( $variable_product ) ) {
|
|
|
|
|
786 |
$qty = 1;
|
787 |
$product_price = wc_get_price_to_display($variable_product, array('qty' => $qty));
|
788 |
$tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
|
789 |
+
|
790 |
+
//$markup = array();
|
791 |
+
//$markup = apply_filters( 'woocommerce_structured_data_product', $markup, $variable_product, $variation_id );
|
792 |
+
|
793 |
+
//function filter_woocommerce_structured_data_product($markup,$variable_product,$variation_id) {
|
794 |
+
// $woosea_brand = ucfirst( get_post_meta( $markup['variation_id'], '_woosea_brand', true ) );
|
795 |
+
// if ( empty( $markup[ 'brand' ] ) ) {
|
796 |
+
// $markup[ 'brand' ] = array(
|
797 |
+
// '@type' => 'Brand',
|
798 |
+
// 'name' => $woosea_brand,
|
799 |
+
// );
|
800 |
+
// }
|
801 |
+
// return $markup;
|
802 |
+
//}
|
803 |
+
//add_filter( 'woocommerce_structured_data_product', 'filter_woocommerce_structured_data_product', 10, 3 );
|
804 |
+
|
805 |
// Workaround for price caching issues
|
806 |
if(!empty($tax_rates)){
|
807 |
foreach ($tax_rates as $tk => $tv){
|
823 |
$product_price = wc_get_price_excluding_tax($variable_product,array('price'=> $variable_product->get_price())) * (100+$tax_rates[1]['rate'])/100;
|
824 |
$product_price = round($product_price, 2);
|
825 |
|
826 |
+
// get product MPN
|
827 |
+
$mpn = get_post_meta( $variation_id, '_woosea_mpn', true );
|
828 |
+
|
829 |
// Get product condition
|
830 |
$condition = ucfirst( get_post_meta( $variation_id, '_woosea_condition', true ) );
|
831 |
+
|
832 |
if(!$condition){
|
833 |
$json_condition = "NewCondition";
|
834 |
} else {
|
842 |
} else {
|
843 |
$availability = "InStock";
|
844 |
}
|
845 |
+
|
846 |
+
if ( $variable_product->is_on_sale() && $variable_product->get_date_on_sale_to() ) {
|
847 |
+
$price_valid_until = date( 'Y-m-d', $variable_product->get_date_on_sale_to()->getTimestamp() );
|
848 |
+
}
|
849 |
|
850 |
$markup_offer = array(
|
851 |
+
'@type' => 'Offer',
|
852 |
+
'price' => $product_price,
|
853 |
+
'priceValidUntil' => $price_valid_until,
|
854 |
+
'priceCurrency' => $shop_currency,
|
855 |
+
'itemCondition' => 'https://schema.org/'.$json_condition.'',
|
856 |
+
'availability' => 'https://schema.org/'.$availability.'',
|
857 |
+
'sku' => $product->get_sku(),
|
858 |
+
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
859 |
+
'description' => $product->get_description(),
|
860 |
+
'seller' => array(
|
861 |
+
'@type' => 'Organization',
|
862 |
+
'name' => $shop_name,
|
863 |
+
'url' => $shop_url,
|
864 |
),
|
865 |
+
'url' => $link
|
866 |
);
|
867 |
} else {
|
868 |
// AggregateOffer
|
875 |
'@type' => 'Offer',
|
876 |
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
877 |
'priceCurrency' => $shop_currency,
|
878 |
+
'itemCondition' => 'https://schema.org/'.$json_condition.'',
|
879 |
'availability' => 'https://schema.org/' . $stock = ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
880 |
'sku' => $product->get_sku(),
|
881 |
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
893 |
'lowPrice' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
894 |
'highPrice' => wc_format_decimal( $highest, wc_get_price_decimals() ),
|
895 |
'priceCurrency' => $shop_currency,
|
896 |
+
'itemCondition' => 'https://schema.org/'.$json_condition.'',
|
897 |
'availability' => 'https://schema.org/' . $stock = ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
898 |
'sku' => $product->get_sku(),
|
899 |
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
952 |
$product_price = wc_get_price_excluding_tax($product,array('price'=> $product->get_price())) * (100+$tax_rates[1]['rate'])/100;
|
953 |
$product_price = round($product_price, 2);
|
954 |
|
955 |
+
// Assume prices will be valid until the end of next year, unless on sale and there is an end date.
|
956 |
+
$price_valid_until = date( 'Y-12-31', current_time( 'timestamp', true ) + YEAR_IN_SECONDS );
|
957 |
+
|
958 |
$markup_offer = array(
|
959 |
'@type' => 'Offer',
|
960 |
'price' => $product_price,
|
961 |
+
'priceValidUntil' => $price_valid_until,
|
962 |
'priceCurrency' => $shop_currency,
|
963 |
+
'itemCondition' => 'https://schema.org/'.$json_condition.'',
|
964 |
'availability' => 'https://schema.org/' . $stock = ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
965 |
'sku' => $product->get_sku(),
|
966 |
'image' => wp_get_attachment_url( $product->get_image_id() ),
|
978 |
// Just use the old WooCommerce buggy setting
|
979 |
if ( '' !== $product->get_price() ) {
|
980 |
|
981 |
+
$price_valid_until = date( 'Y-12-31', current_time( 'timestamp', true ) + YEAR_IN_SECONDS );
|
982 |
+
|
983 |
+
if ( $product->is_type( 'variable' ) ) {
|
984 |
$prices = $product->get_variation_prices();
|
985 |
$lowest = reset( $prices['price'] );
|
986 |
$highest = end( $prices['price'] );
|
990 |
$markup_offer = array(
|
991 |
'@type' => 'Offer',
|
992 |
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
993 |
+
'priceValidUntil' => $price_valid_until,
|
994 |
'priceCurrency' => $shop_currency,
|
995 |
);
|
996 |
|
1000 |
'@type' => 'AggregateOffer',
|
1001 |
'lowPrice' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
1002 |
'highPrice' => wc_format_decimal( $highest, wc_get_price_decimals() ),
|
1003 |
+
'priceValidUntil' => $price_valid_until,
|
1004 |
'priceCurrency' => $shop_currency,
|
1005 |
'availability' => 'https://schema.org/' . ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
1006 |
'seller' => array(
|
1011 |
);
|
1012 |
}
|
1013 |
} else {
|
1014 |
+
if ( $product->is_on_sale() && $product->get_date_on_sale_to() ) {
|
1015 |
+
$price_valid_until = date( 'Y-m-d', $product->get_date_on_sale_to()->getTimestamp() );
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
$permalink = get_permalink( $product->get_id() );
|
1019 |
$markup_offer = array(
|
1020 |
'@type' => 'Offer',
|
1021 |
'price' => wc_format_decimal( $product->get_price(), wc_get_price_decimals() ),
|
1022 |
+
'priceValidUntil' => $price_valid_until,
|
1023 |
'priceCurrency' => $shop_currency,
|
1024 |
'availability' => 'https://schema.org/' . ( $product->is_in_stock() ? 'InStock' : 'OutOfStock' ),
|
1025 |
+
'url' => $permalink,
|
1026 |
+
'seller' => array(
|
1027 |
'@type' => 'Organization',
|
1028 |
'name' => $shop_name,
|
1029 |
'url' => $shop_url,
|
1268 |
$attribute_value = sanitize_text_field($_POST['attribute_value']);
|
1269 |
$active = sanitize_text_field($_POST['active']);
|
1270 |
|
|
|
|
|
|
|
1271 |
if(!get_option( 'woosea_extra_attributes' )){
|
1272 |
if($active == "true"){
|
1273 |
$extra_attributes = array(
|
1373 |
}
|
1374 |
add_action( 'wp_ajax_woosea_structured_vat', 'woosea_structured_vat' );
|
1375 |
|
1376 |
+
/**
|
1377 |
+
* This function enables the setting to add
|
1378 |
+
* Product data manipulation support
|
1379 |
+
*/
|
1380 |
+
function woosea_add_manipulation (){
|
1381 |
+
$status = sanitize_text_field($_POST['status']);
|
1382 |
+
|
1383 |
+
if ($status == "off"){
|
1384 |
+
update_option( 'add_manipulation_support', 'no', 'yes');
|
1385 |
+
} else {
|
1386 |
+
update_option( 'add_manipulation_support', 'yes', 'yes');
|
1387 |
+
}
|
1388 |
+
}
|
1389 |
+
add_action( 'wp_ajax_woosea_add_manipulation', 'woosea_add_manipulation' );
|
1390 |
+
|
1391 |
/**
|
1392 |
* This function enables the setting to add
|
1393 |
* WPML support
|
1433 |
}
|
1434 |
add_action( 'wp_ajax_woosea_add_mother_image', 'woosea_add_mother_image' );
|
1435 |
|
1436 |
+
/**
|
1437 |
+
* This function enables the setting to use
|
1438 |
+
* logging
|
1439 |
+
*/
|
1440 |
+
function woosea_add_woosea_logging (){
|
1441 |
+
$status = sanitize_text_field($_POST['status']);
|
1442 |
+
|
1443 |
+
if ($status == "off"){
|
1444 |
+
update_option( 'add_woosea_logging', 'no', 'yes');
|
1445 |
+
} else {
|
1446 |
+
update_option( 'add_woosea_logging', 'yes', 'yes');
|
1447 |
+
}
|
1448 |
+
}
|
1449 |
+
add_action( 'wp_ajax_woosea_add_woosea_logging', 'woosea_add_woosea_logging' );
|
1450 |
+
|
1451 |
/**
|
1452 |
* This function enables the setting to add
|
1453 |
* Google's Dynamic Remarketing
|
1477 |
}
|
1478 |
add_action( 'wp_ajax_woosea_add_identifiers', 'woosea_add_identifiers' );
|
1479 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1480 |
/**
|
1481 |
* This function add the actual fields to the edit product page for single products
|
1482 |
* identifiers GTIN, MPN, EAN, UPC, Brand and Condition
|
1570 |
)
|
1571 |
);
|
1572 |
|
1573 |
+
// Color Field
|
1574 |
+
woocommerce_wp_text_input(
|
1575 |
+
array(
|
1576 |
+
'id' => '_woosea_color',
|
1577 |
+
'label' => __( 'Color', 'woocommerce' ),
|
1578 |
+
'desc_tip' => 'true',
|
1579 |
+
'description' => __( 'Insert a color.', 'woocommerce' ),
|
1580 |
+
)
|
1581 |
+
);
|
1582 |
+
|
1583 |
+
// Size Field
|
1584 |
+
woocommerce_wp_text_input(
|
1585 |
+
array(
|
1586 |
+
'id' => '_woosea_size',
|
1587 |
+
'label' => __( 'Size', 'woocommerce' ),
|
1588 |
+
'desc_tip' => 'true',
|
1589 |
+
'description' => __( 'Insert a size.', 'woocommerce' ),
|
1590 |
+
)
|
1591 |
+
);
|
1592 |
+
|
1593 |
+
// Add gender drop-down
|
1594 |
+
woocommerce_wp_select(
|
1595 |
+
array(
|
1596 |
+
'id' => '_woosea_gender',
|
1597 |
+
'label' => __( 'Gender', 'woocommerce' ),
|
1598 |
+
'desc_tip' => 'true',
|
1599 |
+
'description' => __( 'Select gender.', 'woocommerce' ),
|
1600 |
+
'options' => array (
|
1601 |
+
'' => __( '', 'woocommerce' ),
|
1602 |
+
'female' => __( 'female', 'woocommerce' ),
|
1603 |
+
'male' => __( 'male', 'woocommerce' ),
|
1604 |
+
'unisex' => __( 'unisex', 'woocommerce' ),
|
1605 |
+
)
|
1606 |
+
)
|
1607 |
+
);
|
1608 |
+
|
1609 |
+
// Material Field
|
1610 |
+
woocommerce_wp_text_input(
|
1611 |
+
array(
|
1612 |
+
'id' => '_woosea_material',
|
1613 |
+
'label' => __( 'Material', 'woocommerce' ),
|
1614 |
+
'desc_tip' => 'true',
|
1615 |
+
'description' => __( 'Enter a material.', 'woocommerce' ),
|
1616 |
+
)
|
1617 |
+
);
|
1618 |
+
|
1619 |
+
// Pattern Field
|
1620 |
+
woocommerce_wp_text_input(
|
1621 |
+
array(
|
1622 |
+
'id' => '_woosea_pattern',
|
1623 |
+
'label' => __( 'Pattern', 'woocommerce' ),
|
1624 |
+
'desc_tip' => 'true',
|
1625 |
+
'description' => __( 'Enter a pattern.', 'woocommerce' ),
|
1626 |
+
)
|
1627 |
+
);
|
1628 |
+
|
1629 |
+
// Add product age_group drop-down
|
1630 |
+
woocommerce_wp_select(
|
1631 |
+
array(
|
1632 |
+
'id' => '_woosea_age_group',
|
1633 |
+
'label' => __( 'Age group', 'woocommerce' ),
|
1634 |
+
'desc_tip' => 'true',
|
1635 |
+
'description' => __( 'Select the product age group.', 'woocommerce' ),
|
1636 |
+
'options' => array (
|
1637 |
+
'' => __( '', 'woocommerce' ),
|
1638 |
+
'newborn' => __( 'newborn', 'woocommerce' ),
|
1639 |
+
'infant' => __( 'infant', 'woocommerce' ),
|
1640 |
+
'toddler' => __( 'toddler', 'woocommerce' ),
|
1641 |
+
'kids' => __( 'kids', 'woocommerce' ),
|
1642 |
+
'adult' => __( 'adult', 'woocommerce' ),
|
1643 |
+
)
|
1644 |
+
)
|
1645 |
+
);
|
1646 |
+
|
1647 |
// Unit pricing measure Field
|
1648 |
woocommerce_wp_text_input(
|
1649 |
array(
|
1680 |
'id' => '_woosea_installment_amount',
|
1681 |
'label' => __( 'Installment amount', 'woocommerce' ),
|
1682 |
'desc_tip' => 'true',
|
1683 |
+
'description' => __( 'Enter the amount the bbuyer has to pay per month.', 'woocommerce' ),
|
1684 |
+
)
|
1685 |
+
);
|
1686 |
+
|
1687 |
+
// Cost of goods sold
|
1688 |
+
woocommerce_wp_text_input(
|
1689 |
+
array(
|
1690 |
+
'id' => '_woosea_cost_of_good_sold',
|
1691 |
+
'label' => __( 'Cost of goods sold', 'woocommerce' ),
|
1692 |
+
'desc_tip' => 'true',
|
1693 |
+
'description' => __( 'Enter the cost of good you are selling.', 'woocommerce' ),
|
1694 |
+
)
|
1695 |
+
);
|
1696 |
+
|
1697 |
+
// Multipack
|
1698 |
+
woocommerce_wp_text_input(
|
1699 |
+
array(
|
1700 |
+
'id' => '_woosea_multipack',
|
1701 |
+
'label' => __( 'Multipack', 'woocommerce' ),
|
1702 |
+
'desc_tip' => 'true',
|
1703 |
+
'description' => __( 'Enter the multipack amount.', 'woocommerce' ),
|
1704 |
+
)
|
1705 |
+
);
|
1706 |
+
|
1707 |
+
// Is bundle
|
1708 |
+
woocommerce_wp_select(
|
1709 |
+
array(
|
1710 |
+
'id' => '_woosea_is_bundle',
|
1711 |
+
'label' => __( 'Is bundle', 'woocommerce' ),
|
1712 |
+
'desc_tip' => 'true',
|
1713 |
+
'description' => __( 'Select the is bundle value.', 'woocommerce' ),
|
1714 |
+
'options' => array (
|
1715 |
+
'' => __( '', 'woocommerce' ),
|
1716 |
+
'yes' => __( 'yes', 'woocommerce' ),
|
1717 |
+
'no' => __( 'no', 'woocommerce' ),
|
1718 |
+
)
|
1719 |
+
)
|
1720 |
+
);
|
1721 |
+
|
1722 |
+
// Energy efficiency class
|
1723 |
+
woocommerce_wp_select(
|
1724 |
+
array(
|
1725 |
+
'id' => '_woosea_energy_efficiency_class',
|
1726 |
+
'label' => __( 'Energy efficiency class', 'woocommerce' ),
|
1727 |
+
'desc_tip' => 'true',
|
1728 |
+
'description' => __( 'Select the product energy efficiency class.', 'woocommerce' ),
|
1729 |
+
'options' => array (
|
1730 |
+
'' => __( '', 'woocommerce' ),
|
1731 |
+
'A+++' => __( 'A+++', 'woocommerce' ),
|
1732 |
+
'A++' => __( 'A++', 'woocommerce' ),
|
1733 |
+
'A+' => __( 'A+', 'woocommerce' ),
|
1734 |
+
'A' => __( 'A', 'woocommerce' ),
|
1735 |
+
'B' => __( 'B', 'woocommerce' ),
|
1736 |
+
'C' => __( 'C', 'woocommerce' ),
|
1737 |
+
'D' => __( 'D', 'woocommerce' ),
|
1738 |
+
'E' => __( 'E', 'woocommerce' ),
|
1739 |
+
'F' => __( 'F', 'woocommerce' ),
|
1740 |
+
'G' => __( 'G', 'woocommerce' ),
|
1741 |
+
)
|
1742 |
+
)
|
1743 |
+
);
|
1744 |
+
|
1745 |
+
// Minimum energy efficiency class
|
1746 |
+
woocommerce_wp_select(
|
1747 |
+
array(
|
1748 |
+
'id' => '_woosea_min_energy_efficiency_class',
|
1749 |
+
'label' => __( 'Minimum energy efficiency class', 'woocommerce' ),
|
1750 |
+
'desc_tip' => 'true',
|
1751 |
+
'description' => __( 'Select the minimum product energy efficiency class.', 'woocommerce' ),
|
1752 |
+
'options' => array (
|
1753 |
+
'' => __( '', 'woocommerce' ),
|
1754 |
+
'A+++' => __( 'A+++', 'woocommerce' ),
|
1755 |
+
'A++' => __( 'A++', 'woocommerce' ),
|
1756 |
+
'A+' => __( 'A+', 'woocommerce' ),
|
1757 |
+
'A' => __( 'A', 'woocommerce' ),
|
1758 |
+
'B' => __( 'B', 'woocommerce' ),
|
1759 |
+
'C' => __( 'C', 'woocommerce' ),
|
1760 |
+
'D' => __( 'D', 'woocommerce' ),
|
1761 |
+
'E' => __( 'E', 'woocommerce' ),
|
1762 |
+
'F' => __( 'F', 'woocommerce' ),
|
1763 |
+
'G' => __( 'G', 'woocommerce' ),
|
1764 |
+
)
|
1765 |
+
)
|
1766 |
+
);
|
1767 |
+
|
1768 |
+
// Maximum energy efficiency class
|
1769 |
+
woocommerce_wp_select(
|
1770 |
+
array(
|
1771 |
+
'id' => '_woosea_max_energy_efficiency_class',
|
1772 |
+
'label' => __( 'Maximum energy efficiency class', 'woocommerce' ),
|
1773 |
+
'desc_tip' => 'true',
|
1774 |
+
'description' => __( 'Select the maximum product energy efficiency class.', 'woocommerce' ),
|
1775 |
+
'options' => array (
|
1776 |
+
'' => __( '', 'woocommerce' ),
|
1777 |
+
'A+++' => __( 'A+++', 'woocommerce' ),
|
1778 |
+
'A++' => __( 'A++', 'woocommerce' ),
|
1779 |
+
'A+' => __( 'A+', 'woocommerce' ),
|
1780 |
+
'A' => __( 'A', 'woocommerce' ),
|
1781 |
+
'B' => __( 'B', 'woocommerce' ),
|
1782 |
+
'C' => __( 'C', 'woocommerce' ),
|
1783 |
+
'D' => __( 'D', 'woocommerce' ),
|
1784 |
+
'E' => __( 'E', 'woocommerce' ),
|
1785 |
+
'F' => __( 'F', 'woocommerce' ),
|
1786 |
+
'G' => __( 'G', 'woocommerce' ),
|
1787 |
+
)
|
1788 |
+
)
|
1789 |
+
);
|
1790 |
+
|
1791 |
+
// Is promotion
|
1792 |
+
woocommerce_wp_text_input(
|
1793 |
+
array(
|
1794 |
+
'id' => '_woosea_is_promotion',
|
1795 |
+
'label' => __( 'Is promotion', 'woocommerce' ),
|
1796 |
+
'desc_tip' => 'true',
|
1797 |
+
'description' => __( 'Enter your promotion ID.', 'woocommerce' ),
|
1798 |
+
)
|
1799 |
+
);
|
1800 |
+
|
1801 |
+
// Custom field 0
|
1802 |
+
woocommerce_wp_text_input(
|
1803 |
+
array(
|
1804 |
+
'id' => '_woosea_custom_field_0',
|
1805 |
+
'label' => __( 'Custom field 0', 'woocommerce' ),
|
1806 |
+
'desc_tip' => 'true',
|
1807 |
+
'description' => __( 'Enter your custom field 0', 'woocommerce' ),
|
1808 |
+
)
|
1809 |
+
);
|
1810 |
+
|
1811 |
+
// Custom field 1
|
1812 |
+
woocommerce_wp_text_input(
|
1813 |
+
array(
|
1814 |
+
'id' => '_woosea_custom_field_1',
|
1815 |
+
'label' => __( 'Custom field 1', 'woocommerce' ),
|
1816 |
+
'desc_tip' => 'true',
|
1817 |
+
'description' => __( 'Enter your custom field 1', 'woocommerce' ),
|
1818 |
+
)
|
1819 |
+
);
|
1820 |
+
|
1821 |
+
// Custom field 2
|
1822 |
+
woocommerce_wp_text_input(
|
1823 |
+
array(
|
1824 |
+
'id' => '_woosea_custom_field_2',
|
1825 |
+
'label' => __( 'Custom field 2', 'woocommerce' ),
|
1826 |
+
'desc_tip' => 'true',
|
1827 |
+
'description' => __( 'Enter your custom field 2', 'woocommerce' ),
|
1828 |
+
)
|
1829 |
+
);
|
1830 |
+
|
1831 |
+
// Custom field 3
|
1832 |
+
woocommerce_wp_text_input(
|
1833 |
+
array(
|
1834 |
+
'id' => '_woosea_custom_field_3',
|
1835 |
+
'label' => __( 'Custom field 3', 'woocommerce' ),
|
1836 |
+
'desc_tip' => 'true',
|
1837 |
+
'description' => __( 'Enter your custom field 3', 'woocommerce' ),
|
1838 |
+
)
|
1839 |
+
);
|
1840 |
+
|
1841 |
+
// Custom field 4
|
1842 |
+
woocommerce_wp_text_input(
|
1843 |
+
array(
|
1844 |
+
'id' => '_woosea_custom_field_4',
|
1845 |
+
'label' => __( 'Custom field 4', 'woocommerce' ),
|
1846 |
+
'desc_tip' => 'true',
|
1847 |
+
'description' => __( 'Enter your custom field 4', 'woocommerce' ),
|
1848 |
)
|
1849 |
);
|
1850 |
|
1867 |
* This function saves the input from the extra fields on the single product edit page
|
1868 |
*/
|
1869 |
function woosea_save_custom_general_fields($post_id){
|
1870 |
+
$woocommerce_brand = empty($_POST['_woosea_brand']) ? '' : sanitize_text_field($_POST['_woosea_brand']);
|
1871 |
+
$woocommerce_gtin = empty($_POST['_woosea_gtin']) ? '' : sanitize_text_field($_POST['_woosea_gtin']);
|
1872 |
+
$woocommerce_upc = empty($_POST['_woosea_upc']) ? '' : sanitize_text_field($_POST['_woosea_upc']);
|
1873 |
+
$woocommerce_mpn = empty($_POST['_woosea_mpn']) ? '' : sanitize_text_field($_POST['_woosea_mpn']);
|
1874 |
+
$woocommerce_ean = empty($_POST['_woosea_ean']) ? '' : sanitize_text_field($_POST['_woosea_ean']);
|
1875 |
+
$woocommerce_title = empty($_POST['_woosea_optimized_title']) ? '' : sanitize_text_field($_POST['_woosea_optimized_title']);
|
1876 |
+
$woocommerce_color = empty($_POST['_woosea_color']) ? '' : sanitize_text_field($_POST['_woosea_color']);
|
1877 |
+
$woocommerce_size = empty($_POST['_woosea_size']) ? '' : sanitize_text_field($_POST['_woosea_size']);
|
1878 |
+
$woocommerce_gender = empty($_POST['_woosea_gender']) ? '' : sanitize_text_field($_POST['_woosea_gender']);
|
1879 |
+
$woocommerce_material = empty($_POST['_woosea_material']) ? '' : sanitize_text_field($_POST['_woosea_material']);
|
1880 |
+
$woocommerce_pattern = empty($_POST['_woosea_pattern']) ? '' : sanitize_text_field($_POST['_woosea_pattern']);
|
1881 |
+
$woocommerce_unit_pricing_measure = empty($_POST['_woosea_unit_pricing_measure']) ? '' : sanitize_text_field($_POST['_woosea_unit_pricing_measure']);
|
1882 |
+
$woocommerce_unit_pricing_base_measure = empty($_POST['_woosea_unit_pricing_base_measure']) ? '' : sanitize_text_field($_POST['_woosea_unit_pricing_base_measure']);
|
1883 |
+
$woocommerce_installment_months = empty($_POST['_woosea_installment_months']) ? '' : sanitize_text_field($_POST['_woosea_installment_months']);
|
1884 |
+
$woocommerce_installment_amount = empty($_POST['_woosea_installment_amount']) ? '' : sanitize_text_field($_POST['_woosea_installment_amount']);
|
1885 |
+
$woocommerce_condition = empty($_POST['_woosea_condition']) ? '' : sanitize_text_field($_POST['_woosea_condition']);
|
1886 |
+
$woocommerce_age_group = empty($_POST['_woosea_age_group']) ? '' : sanitize_text_field($_POST['_woosea_age_group']);
|
1887 |
+
$woocommerce_cost_of_good_sold = empty($_POST['_woosea_cost_of_good_sold']) ? '' : sanitize_text_field($_POST['_woosea_cost_of_good_sold']);
|
1888 |
+
$woocommerce_multipack = empty($_POST['_woosea_multipack']) ? '' : sanitize_text_field($_POST['_woosea_multipack']);
|
1889 |
+
$woocommerce_is_bundle = empty($_POST['_woosea_is_bundle']) ? '' : sanitize_text_field($_POST['_woosea_is_bundle']);
|
1890 |
+
$woocommerce_energy_efficiency_class = empty($_POST['_woosea_energy_efficiency_class']) ? '' : sanitize_text_field($_POST['_woosea_energy_efficiency_class']);
|
1891 |
+
$woocommerce_min_energy_efficiency_class = empty($_POST['_woosea_min_energy_efficiency_class']) ? '' : sanitize_text_field($_POST['_woosea_min_energy_efficiency_class']);
|
1892 |
+
$woocommerce_max_energy_efficiency_class = empty($_POST['_woosea_max_energy_efficiency_class']) ? '' : sanitize_text_field($_POST['_woosea_max_energy_efficiency_class']);
|
1893 |
+
$woocommerce_is_promotion = empty($_POST['_woosea_is_promotion']) ? '' : sanitize_text_field($_POST['_woosea_is_promotion']);
|
1894 |
+
$woocommerce_custom_field_0 = empty($_POST['_woosea_custom_field_0']) ? '' : sanitize_text_field($_POST['_woosea_custom_field_0']);
|
1895 |
+
$woocommerce_custom_field_1 = empty($_POST['_woosea_custom_field_1']) ? '' : sanitize_text_field($_POST['_woosea_custom_field_1']);
|
1896 |
+
$woocommerce_custom_field_2 = empty($_POST['_woosea_custom_field_2']) ? '' : sanitize_text_field($_POST['_woosea_custom_field_2']);
|
1897 |
+
$woocommerce_custom_field_3 = empty($_POST['_woosea_custom_field_3']) ? '' : sanitize_text_field($_POST['_woosea_custom_field_3']);
|
1898 |
+
$woocommerce_custom_field_4 = empty($_POST['_woosea_custom_field_4']) ? '' : sanitize_text_field($_POST['_woosea_custom_field_4']);
|
1899 |
+
|
1900 |
if(!empty($_POST['_woosea_exclude_product'])){
|
1901 |
$woocommerce_exclude_product = sanitize_text_field($_POST['_woosea_exclude_product']);
|
1902 |
} else {
|
1918 |
if(isset($woocommerce_gtin))
|
1919 |
update_post_meta( $post_id, '_woosea_gtin', esc_attr($woocommerce_gtin));
|
1920 |
|
1921 |
+
if(isset($woocommerce_color))
|
1922 |
+
update_post_meta( $post_id, '_woosea_color', esc_attr($woocommerce_color));
|
1923 |
+
|
1924 |
+
if(isset($woocommerce_size))
|
1925 |
+
update_post_meta( $post_id, '_woosea_size', esc_attr($woocommerce_size));
|
1926 |
+
|
1927 |
+
if(isset($woocommerce_gender))
|
1928 |
+
update_post_meta( $post_id, '_woosea_gender', esc_attr($woocommerce_gender));
|
1929 |
+
|
1930 |
+
if(isset($woocommerce_material))
|
1931 |
+
update_post_meta( $post_id, '_woosea_material', esc_attr($woocommerce_material));
|
1932 |
+
|
1933 |
+
if(isset($woocommerce_pattern))
|
1934 |
+
update_post_meta( $post_id, '_woosea_pattern', esc_attr($woocommerce_pattern));
|
1935 |
+
|
1936 |
if(isset($woocommerce_title))
|
1937 |
update_post_meta( $post_id, '_woosea_optimized_title', $woocommerce_title);
|
1938 |
|
1945 |
if(isset($woocommerce_condition))
|
1946 |
update_post_meta( $post_id, '_woosea_condition', $woocommerce_condition);
|
1947 |
|
1948 |
+
if(isset($woocommerce_age_group))
|
1949 |
+
update_post_meta( $post_id, '_woosea_age_group', $woocommerce_age_group);
|
1950 |
+
|
1951 |
if(isset($woocommerce_installment_months))
|
1952 |
update_post_meta( $post_id, '_woosea_installment_months', esc_attr($woocommerce_installment_months));
|
1953 |
|
1956 |
|
1957 |
if(isset($woocommerce_exclude_product))
|
1958 |
update_post_meta( $post_id, '_woosea_exclude_product', esc_attr($woocommerce_exclude_product));
|
1959 |
+
|
1960 |
+
if(isset($woocommerce_cost_of_good_sold))
|
1961 |
+
update_post_meta( $post_id, '_woosea_cost_of_good_sold', esc_attr($woocommerce_cost_of_good_sold));
|
1962 |
+
|
1963 |
+
if(isset($woocommerce_multipack))
|
1964 |
+
update_post_meta( $post_id, '_woosea_multipack', esc_attr($woocommerce_multipack));
|
1965 |
+
|
1966 |
+
if(isset($woocommerce_is_bundle))
|
1967 |
+
update_post_meta( $post_id, '_woosea_is_bundle', esc_attr($woocommerce_is_bundle));
|
1968 |
+
|
1969 |
+
if(isset($woocommerce_energy_efficiency_class))
|
1970 |
+
update_post_meta( $post_id, '_woosea_energy_efficiency_class', esc_attr($woocommerce_energy_efficiency_class));
|
1971 |
+
|
1972 |
+
if(isset($woocommerce_min_energy_efficiency_class))
|
1973 |
+
update_post_meta( $post_id, '_woosea_min_energy_efficiency_class', esc_attr($woocommerce_min_energy_efficiency_class));
|
1974 |
+
|
1975 |
+
if(isset($woocommerce_max_energy_efficiency_class))
|
1976 |
+
update_post_meta( $post_id, '_woosea_max_energy_efficiency_class', esc_attr($woocommerce_max_energy_efficiency_class));
|
1977 |
+
|
1978 |
+
if(isset($woocommerce_is_promotion))
|
1979 |
+
update_post_meta( $post_id, '_woosea_is_promotion', esc_attr($woocommerce_is_promotion));
|
1980 |
+
|
1981 |
+
if(isset($woocommerce_custom_field_0))
|
1982 |
+
update_post_meta( $post_id, '_woosea_custom_field_0', esc_attr($woocommerce_custom_field_0));
|
1983 |
+
|
1984 |
+
if(isset($woocommerce_custom_field_1))
|
1985 |
+
update_post_meta( $post_id, '_woosea_custom_field_1', esc_attr($woocommerce_custom_field_1));
|
1986 |
+
|
1987 |
+
if(isset($woocommerce_custom_field_2))
|
1988 |
+
update_post_meta( $post_id, '_woosea_custom_field_2', esc_attr($woocommerce_custom_field_2));
|
1989 |
+
|
1990 |
+
if(isset($woocommerce_custom_field_3))
|
1991 |
+
update_post_meta( $post_id, '_woosea_custom_field_3', esc_attr($woocommerce_custom_field_3));
|
1992 |
+
|
1993 |
+
if(isset($woocommerce_custom_field_4))
|
1994 |
+
update_post_meta( $post_id, '_woosea_custom_field_4', esc_attr($woocommerce_custom_field_4));
|
1995 |
}
|
1996 |
add_action( 'woocommerce_process_product_meta', 'woosea_save_custom_general_fields' );
|
1997 |
|
2068 |
)
|
2069 |
);
|
2070 |
|
2071 |
+
// Color field
|
2072 |
+
woocommerce_wp_text_input(
|
2073 |
+
array(
|
2074 |
+
'id' => '_woosea_variable_color['.$loop.']',
|
2075 |
+
'label' => __( '<br>Color', 'woocommerce' ),
|
2076 |
+
'placeholder' => 'Color',
|
2077 |
+
'desc_tip' => 'true',
|
2078 |
+
'description' => __( 'Enter the product Color here.', 'woocommerce' ),
|
2079 |
+
'value' => get_post_meta($variation->ID, '_woosea_color', true),
|
2080 |
+
'wrapper_class' => 'form-row-first',
|
2081 |
+
)
|
2082 |
+
);
|
2083 |
+
|
2084 |
+
// Size field
|
2085 |
+
woocommerce_wp_text_input(
|
2086 |
+
array(
|
2087 |
+
'id' => '_woosea_variable_size['.$loop.']',
|
2088 |
+
'label' => __( '<br>Size', 'woocommerce' ),
|
2089 |
+
'placeholder' => 'Size',
|
2090 |
+
'desc_tip' => 'true',
|
2091 |
+
'description' => __( 'Enter the product Size here.', 'woocommerce' ),
|
2092 |
+
'value' => get_post_meta($variation->ID, '_woosea_size', true),
|
2093 |
+
'wrapper_class' => 'form-row-first',
|
2094 |
+
)
|
2095 |
+
);
|
2096 |
+
|
2097 |
+
// Add Gender drop-down
|
2098 |
+
woocommerce_wp_select(
|
2099 |
+
array(
|
2100 |
+
'id' => '_woosea_gender['.$loop.']',
|
2101 |
+
'label' => __( 'Gender', 'woocommerce' ),
|
2102 |
+
'placeholder' => 'Gender',
|
2103 |
+
'desc_tip' => 'true',
|
2104 |
+
'description' => __( 'Select the gender.', 'woocommerce' ),
|
2105 |
+
'value' => get_post_meta($variation->ID, '_woosea_gender', true),
|
2106 |
+
'wrapper_class' => 'form-row form-row-full',
|
2107 |
+
'options' => array (
|
2108 |
+
'' => __( '', 'woocommerce' ),
|
2109 |
+
'female' => __( 'female', 'woocommerce' ),
|
2110 |
+
'male' => __( 'male', 'woocommerce' ),
|
2111 |
+
'unisex' => __( 'unisex', 'woocommerce' ),
|
2112 |
+
)
|
2113 |
+
)
|
2114 |
+
);
|
2115 |
+
|
2116 |
+
// Material field
|
2117 |
+
woocommerce_wp_text_input(
|
2118 |
+
array(
|
2119 |
+
'id' => '_woosea_variable_material['.$loop.']',
|
2120 |
+
'label' => __( '<br>Material', 'woocommerce' ),
|
2121 |
+
'placeholder' => 'Material',
|
2122 |
+
'desc_tip' => 'true',
|
2123 |
+
'description' => __( 'Enter the product Material here.', 'woocommerce' ),
|
2124 |
+
'value' => get_post_meta($variation->ID, '_woosea_material', true),
|
2125 |
+
'wrapper_class' => 'form-row-first',
|
2126 |
+
)
|
2127 |
+
);
|
2128 |
+
|
2129 |
+
// Pattern field
|
2130 |
+
woocommerce_wp_text_input(
|
2131 |
+
array(
|
2132 |
+
'id' => '_woosea_variable_pattern['.$loop.']',
|
2133 |
+
'label' => __( '<br>Pattern', 'woocommerce' ),
|
2134 |
+
'placeholder' => 'Pattern',
|
2135 |
+
'desc_tip' => 'true',
|
2136 |
+
'description' => __( 'Enter the product Pattern here.', 'woocommerce' ),
|
2137 |
+
'value' => get_post_meta($variation->ID, '_woosea_pattern', true),
|
2138 |
+
'wrapper_class' => 'form-row-first',
|
2139 |
+
)
|
2140 |
+
);
|
2141 |
+
|
2142 |
// Variation Unit pricing measure field
|
2143 |
woocommerce_wp_text_input(
|
2144 |
array(
|
2224 |
)
|
2225 |
);
|
2226 |
|
2227 |
+
// Add product age_group drop-down
|
2228 |
+
woocommerce_wp_select(
|
2229 |
+
array(
|
2230 |
+
'id' => '_woosea_age_group['.$loop.']',
|
2231 |
+
'label' => __( 'Product age group', 'woocommerce' ),
|
2232 |
+
'placeholder' => 'Product age group',
|
2233 |
+
'desc_tip' => 'true',
|
2234 |
+
'description' => __( 'Select the product age group.', 'woocommerce' ),
|
2235 |
+
'value' => get_post_meta($variation->ID, '_woosea_age_group', true),
|
2236 |
+
'wrapper_class' => 'form-row form-row-full',
|
2237 |
+
'options' => array (
|
2238 |
+
'' => __( '', 'woocommerce' ),
|
2239 |
+
'newborn' => __( 'newborn', 'woocommerce' ),
|
2240 |
+
'infant' => __( 'infant', 'woocommerce' ),
|
2241 |
+
'toddler' => __( 'toddler', 'woocommerce' ),
|
2242 |
+
'kids' => __( 'kids', 'woocommerce' ),
|
2243 |
+
'adult' => __( 'adult', 'woocommerce' ),
|
2244 |
+
)
|
2245 |
+
)
|
2246 |
+
);
|
2247 |
+
|
2248 |
+
// Cost of good sold
|
2249 |
+
woocommerce_wp_text_input(
|
2250 |
+
array(
|
2251 |
+
'id' => '_woosea_cost_of_good_sold['.$loop.']',
|
2252 |
+
'label' => __( '<br>Cost of good sold', 'woocommerce' ),
|
2253 |
+
'placeholder' => 'Cost of good sold',
|
2254 |
+
'desc_tip' => 'true',
|
2255 |
+
'description' => __( 'Enter the cost of good sold.', 'woocommerce' ),
|
2256 |
+
'value' => get_post_meta($variation->ID, '_woosea_cost_of_good_sold', true),
|
2257 |
+
'wrapper_class' => 'form-row-last',
|
2258 |
+
)
|
2259 |
+
);
|
2260 |
+
|
2261 |
+
// Multipack
|
2262 |
+
woocommerce_wp_text_input(
|
2263 |
+
array(
|
2264 |
+
'id' => '_woosea_multipack['.$loop.']',
|
2265 |
+
'label' => __( '<br>Multipack', 'woocommerce' ),
|
2266 |
+
'placeholder' => 'Multipack amount',
|
2267 |
+
'desc_tip' => 'true',
|
2268 |
+
'description' => __( 'Enter the multipack amount here.', 'woocommerce' ),
|
2269 |
+
'value' => get_post_meta($variation->ID, '_woosea_multipack', true),
|
2270 |
+
'wrapper_class' => 'form-row-last',
|
2271 |
+
)
|
2272 |
+
);
|
2273 |
+
|
2274 |
+
// Is bundle
|
2275 |
+
woocommerce_wp_select(
|
2276 |
+
array(
|
2277 |
+
'id' => '_woosea_is_bundle['.$loop.']',
|
2278 |
+
'label' => __( 'Is bundle', 'woocommerce' ),
|
2279 |
+
'placeholder' => 'Is bundle',
|
2280 |
+
'desc_tip' => 'true',
|
2281 |
+
'description' => __( 'Select the is bundle value.', 'woocommerce' ),
|
2282 |
+
'value' => get_post_meta($variation->ID, '_woosea_is_bundle', true),
|
2283 |
+
'wrapper_class' => 'form-row form-row-full',
|
2284 |
+
'options' => array (
|
2285 |
+
'' => __( '', 'woocommerce' ),
|
2286 |
+
'yes' => __( 'yes', 'woocommerce' ),
|
2287 |
+
'no' => __( 'no', 'woocommerce' ),
|
2288 |
+
)
|
2289 |
+
)
|
2290 |
+
);
|
2291 |
+
|
2292 |
+
// Energy efficiency class
|
2293 |
+
woocommerce_wp_select(
|
2294 |
+
array(
|
2295 |
+
'id' => '_woosea_energy_efficiency_class['.$loop.']',
|
2296 |
+
'label' => __( 'Energy efficiency class', 'woocommerce' ),
|
2297 |
+
'placeholder' => 'Energy efficiency class',
|
2298 |
+
'desc_tip' => 'true',
|
2299 |
+
'description' => __( 'Select the energy efficiency class.', 'woocommerce' ),
|
2300 |
+
'value' => get_post_meta($variation->ID, '_woosea_energy_efficiency_class', true),
|
2301 |
+
'wrapper_class' => 'form-row form-row-full',
|
2302 |
+
'options' => array (
|
2303 |
+
'' => __( '', 'woocommerce' ),
|
2304 |
+
'A+++' => __( 'A+++', 'woocommerce' ),
|
2305 |
+
'A++' => __( 'A++', 'woocommerce' ),
|
2306 |
+
'A+' => __( 'A+', 'woocommerce' ),
|
2307 |
+
'A' => __( 'A', 'woocommerce' ),
|
2308 |
+
'B' => __( 'B', 'woocommerce' ),
|
2309 |
+
'C' => __( 'C', 'woocommerce' ),
|
2310 |
+
'D' => __( 'D', 'woocommerce' ),
|
2311 |
+
'E' => __( 'E', 'woocommerce' ),
|
2312 |
+
'F' => __( 'F', 'woocommerce' ),
|
2313 |
+
'G' => __( 'G', 'woocommerce' ),
|
2314 |
+
)
|
2315 |
+
)
|
2316 |
+
);
|
2317 |
+
|
2318 |
+
// Minimum energy efficiency class
|
2319 |
+
woocommerce_wp_select(
|
2320 |
+
array(
|
2321 |
+
'id' => '_woosea_min_energy_efficiency_class['.$loop.']',
|
2322 |
+
'label' => __( 'Minimum energy efficiency class', 'woocommerce' ),
|
2323 |
+
'placeholder' => 'Minimum energy efficiency class',
|
2324 |
+
'desc_tip' => 'true',
|
2325 |
+
'description' => __( 'Select the minimum energy efficiency class.', 'woocommerce' ),
|
2326 |
+
'value' => get_post_meta($variation->ID, '_woosea_min_energy_efficiency_class', true),
|
2327 |
+
'wrapper_class' => 'form-row form-row-full',
|
2328 |
+
'options' => array (
|
2329 |
+
'' => __( '', 'woocommerce' ),
|
2330 |
+
'A+++' => __( 'A+++', 'woocommerce' ),
|
2331 |
+
'A++' => __( 'A++', 'woocommerce' ),
|
2332 |
+
'A+' => __( 'A+', 'woocommerce' ),
|
2333 |
+
'A' => __( 'A', 'woocommerce' ),
|
2334 |
+
'B' => __( 'B', 'woocommerce' ),
|
2335 |
+
'C' => __( 'C', 'woocommerce' ),
|
2336 |
+
'D' => __( 'D', 'woocommerce' ),
|
2337 |
+
'E' => __( 'E', 'woocommerce' ),
|
2338 |
+
'F' => __( 'F', 'woocommerce' ),
|
2339 |
+
'G' => __( 'G', 'woocommerce' ),
|
2340 |
+
)
|
2341 |
+
)
|
2342 |
+
);
|
2343 |
+
|
2344 |
+
// Maximum energy efficiency class
|
2345 |
+
woocommerce_wp_select(
|
2346 |
+
array(
|
2347 |
+
'id' => '_woosea_max_energy_efficiency_class['.$loop.']',
|
2348 |
+
'label' => __( 'Maximum energy efficiency class', 'woocommerce' ),
|
2349 |
+
'placeholder' => 'Maximum energy efficiency class',
|
2350 |
+
'desc_tip' => 'true',
|
2351 |
+
'description' => __( 'Select the maximum energy efficiency class.', 'woocommerce' ),
|
2352 |
+
'value' => get_post_meta($variation->ID, '_woosea_max_energy_efficiency_class', true),
|
2353 |
+
'wrapper_class' => 'form-row form-row-full',
|
2354 |
+
'options' => array (
|
2355 |
+
'' => __( '', 'woocommerce' ),
|
2356 |
+
'A+++' => __( 'A+++', 'woocommerce' ),
|
2357 |
+
'A++' => __( 'A++', 'woocommerce' ),
|
2358 |
+
'A+' => __( 'A+', 'woocommerce' ),
|
2359 |
+
'A' => __( 'A', 'woocommerce' ),
|
2360 |
+
'B' => __( 'B', 'woocommerce' ),
|
2361 |
+
'C' => __( 'C', 'woocommerce' ),
|
2362 |
+
'D' => __( 'D', 'woocommerce' ),
|
2363 |
+
'E' => __( 'E', 'woocommerce' ),
|
2364 |
+
'F' => __( 'F', 'woocommerce' ),
|
2365 |
+
'G' => __( 'G', 'woocommerce' ),
|
2366 |
+
)
|
2367 |
+
)
|
2368 |
+
);
|
2369 |
+
|
2370 |
+
// Is promotion
|
2371 |
+
woocommerce_wp_text_input(
|
2372 |
+
array(
|
2373 |
+
'id' => '_woosea_is_promotion['.$loop.']',
|
2374 |
+
'label' => __( '<br>Is promotion', 'woocommerce' ),
|
2375 |
+
'placeholder' => 'Is promotion',
|
2376 |
+
'desc_tip' => 'true',
|
2377 |
+
'description' => __( 'Enter your promotion ID', 'woocommerce' ),
|
2378 |
+
'value' => get_post_meta($variation->ID, '_woosea_is_promotion', true),
|
2379 |
+
'wrapper_class' => 'form-row-last',
|
2380 |
+
)
|
2381 |
+
);
|
2382 |
+
|
2383 |
+
// Custom field 0
|
2384 |
+
woocommerce_wp_text_input(
|
2385 |
+
array(
|
2386 |
+
'id' => '_woosea_custom_field_0['.$loop.']',
|
2387 |
+
'label' => __( '<br>Custom field 0', 'woocommerce' ),
|
2388 |
+
'placeholder' => 'Custom field 0',
|
2389 |
+
'desc_tip' => 'true',
|
2390 |
+
'description' => __( 'Enter your custom field 0', 'woocommerce' ),
|
2391 |
+
'value' => get_post_meta($variation->ID, '_woosea_custom_field_0', true),
|
2392 |
+
'wrapper_class' => 'form-row-last',
|
2393 |
+
)
|
2394 |
+
);
|
2395 |
+
|
2396 |
+
// Custom field 1
|
2397 |
+
woocommerce_wp_text_input(
|
2398 |
+
array(
|
2399 |
+
'id' => '_woosea_custom_field_1['.$loop.']',
|
2400 |
+
'label' => __( '<br>Custom field 1', 'woocommerce' ),
|
2401 |
+
'placeholder' => 'Custom field 1',
|
2402 |
+
'desc_tip' => 'true',
|
2403 |
+
'description' => __( 'Enter your custom field 1', 'woocommerce' ),
|
2404 |
+
'value' => get_post_meta($variation->ID, '_woosea_custom_field_1', true),
|
2405 |
+
'wrapper_class' => 'form-row-last',
|
2406 |
+
)
|
2407 |
+
);
|
2408 |
+
|
2409 |
+
// Custom field 2
|
2410 |
+
woocommerce_wp_text_input(
|
2411 |
+
array(
|
2412 |
+
'id' => '_woosea_custom_field_2['.$loop.']',
|
2413 |
+
'label' => __( '<br>Custom field 2', 'woocommerce' ),
|
2414 |
+
'placeholder' => 'Custom field 2',
|
2415 |
+
'desc_tip' => 'true',
|
2416 |
+
'description' => __( 'Enter your custom field 2', 'woocommerce' ),
|
2417 |
+
'value' => get_post_meta($variation->ID, '_woosea_custom_field_2', true),
|
2418 |
+
'wrapper_class' => 'form-row-last',
|
2419 |
+
)
|
2420 |
+
);
|
2421 |
+
|
2422 |
+
// Custom field 3
|
2423 |
+
woocommerce_wp_text_input(
|
2424 |
+
array(
|
2425 |
+
'id' => '_woosea_custom_field_3['.$loop.']',
|
2426 |
+
'label' => __( '<br>Custom field 3', 'woocommerce' ),
|
2427 |
+
'placeholder' => 'Custom field 3',
|
2428 |
+
'desc_tip' => 'true',
|
2429 |
+
'description' => __( 'Enter your custom field 3', 'woocommerce' ),
|
2430 |
+
'value' => get_post_meta($variation->ID, '_woosea_custom_field_3', true),
|
2431 |
+
'wrapper_class' => 'form-row-last',
|
2432 |
+
)
|
2433 |
+
);
|
2434 |
+
|
2435 |
+
// Custom field 4
|
2436 |
+
woocommerce_wp_text_input(
|
2437 |
+
array(
|
2438 |
+
'id' => '_woosea_custom_field_4['.$loop.']',
|
2439 |
+
'label' => __( '<br>Custom field 4', 'woocommerce' ),
|
2440 |
+
'placeholder' => 'Custom field 4',
|
2441 |
+
'desc_tip' => 'true',
|
2442 |
+
'description' => __( 'Enter your custom field 4', 'woocommerce' ),
|
2443 |
+
'value' => get_post_meta($variation->ID, '_woosea_custom_field_4', true),
|
2444 |
+
'wrapper_class' => 'form-row-last',
|
2445 |
+
)
|
2446 |
+
);
|
2447 |
+
|
2448 |
// Exclude product from feed
|
2449 |
woocommerce_wp_checkbox(
|
2450 |
array(
|
2514 |
update_post_meta( $variation_id, '_woosea_gtin', stripslashes( sanitize_text_field( $_gtin[$i] )));
|
2515 |
}
|
2516 |
|
2517 |
+
// Color Field
|
2518 |
+
$_color = $_POST['_woosea_variable_color'];
|
2519 |
+
$variation_id = (int) $variable_post_id[$i];
|
2520 |
+
if ( isset( $_color[$i] ) ) {
|
2521 |
+
update_post_meta( $variation_id, '_woosea_color', stripslashes( sanitize_text_field( $_color[$i] )));
|
2522 |
+
}
|
2523 |
+
|
2524 |
+
// Size Field
|
2525 |
+
$_size = $_POST['_woosea_variable_size'];
|
2526 |
+
$variation_id = (int) $variable_post_id[$i];
|
2527 |
+
if ( isset( $_size[$i] ) ) {
|
2528 |
+
update_post_meta( $variation_id, '_woosea_size', stripslashes( sanitize_text_field( $_size[$i] )));
|
2529 |
+
}
|
2530 |
+
|
2531 |
+
// Gender Field
|
2532 |
+
$_gender = $_POST['_woosea_gender'];
|
2533 |
+
$variation_id = (int) $variable_post_id[$i];
|
2534 |
+
if ( isset( $_gender[$i] ) ) {
|
2535 |
+
update_post_meta( $variation_id, '_woosea_gender', stripslashes( sanitize_text_field( $_gender[$i] )));
|
2536 |
+
}
|
2537 |
+
|
2538 |
+
// Material Field
|
2539 |
+
$_material = $_POST['_woosea_variable_material'];
|
2540 |
+
$variation_id = (int) $variable_post_id[$i];
|
2541 |
+
if ( isset( $_material[$i] ) ) {
|
2542 |
+
update_post_meta( $variation_id, '_woosea_material', stripslashes( sanitize_text_field( $_material[$i] )));
|
2543 |
+
}
|
2544 |
+
|
2545 |
+
// Pattern Field
|
2546 |
+
$_pattern = $_POST['_woosea_variable_pattern'];
|
2547 |
+
$variation_id = (int) $variable_post_id[$i];
|
2548 |
+
if ( isset( $_pattern[$i] ) ) {
|
2549 |
+
update_post_meta( $variation_id, '_woosea_pattern', stripslashes( sanitize_text_field( $_pattern[$i] )));
|
2550 |
+
}
|
2551 |
+
|
2552 |
// Unit pricing measure Field
|
2553 |
$_pricing_measure = $_POST['_woosea_variable_unit_pricing_measure'];
|
2554 |
$variation_id = (int) $variable_post_id[$i];
|
2591 |
update_post_meta( $variation_id, '_woosea_condition', stripslashes( sanitize_text_field( $_condition[$i] )));
|
2592 |
}
|
2593 |
|
2594 |
+
// Product age group
|
2595 |
+
$_age_group = $_POST['_woosea_age_group'];
|
2596 |
+
$variation_id = (int) $variable_post_id[$i];
|
2597 |
+
if ( isset( $_age_group[$i] ) ) {
|
2598 |
+
update_post_meta( $variation_id, '_woosea_age_group', stripslashes( sanitize_text_field( $_age_group[$i] )));
|
2599 |
+
}
|
2600 |
+
|
2601 |
+
|
2602 |
+
// Cost of good sold
|
2603 |
+
$_cost_of_good_sold = $_POST['_woosea_cost_of_good_sold'];
|
2604 |
+
$variation_id = (int) $variable_post_id[$i];
|
2605 |
+
if ( isset( $_cost_of_good_sold[$i] ) ) {
|
2606 |
+
update_post_meta( $variation_id, '_woosea_cost_of_good_sold', stripslashes( sanitize_text_field( $_cost_of_good_sold[$i] )));
|
2607 |
+
}
|
2608 |
+
|
2609 |
+
// Multipack
|
2610 |
+
$_multipack = $_POST['_woosea_multipack'];
|
2611 |
+
$variation_id = (int) $variable_post_id[$i];
|
2612 |
+
if ( isset( $_multipack[$i] ) ) {
|
2613 |
+
update_post_meta( $variation_id, '_woosea_multipack', stripslashes( sanitize_text_field( $_multipack[$i] )));
|
2614 |
+
}
|
2615 |
+
|
2616 |
+
// Is promotion
|
2617 |
+
$_is_promotion = $_POST['_woosea_is_promotion'];
|
2618 |
+
$variation_id = (int) $variable_post_id[$i];
|
2619 |
+
if ( isset( $_is_promotion[$i] ) ) {
|
2620 |
+
update_post_meta( $variation_id, '_woosea_is_promotion', stripslashes( sanitize_text_field( $_is_promotion[$i] )));
|
2621 |
+
}
|
2622 |
+
|
2623 |
+
// Is bundle
|
2624 |
+
$_is_bundle = $_POST['_woosea_is_bundle'];
|
2625 |
+
$variation_id = (int) $variable_post_id[$i];
|
2626 |
+
if ( isset( $_is_bundle[$i] ) ) {
|
2627 |
+
update_post_meta( $variation_id, '_woosea_is_bundle', stripslashes( sanitize_text_field( $_is_bundle[$i] )));
|
2628 |
+
}
|
2629 |
+
|
2630 |
+
// Energy efficiency class
|
2631 |
+
$_energy_efficiency_class = $_POST['_woosea_energy_efficiency_class'];
|
2632 |
+
$variation_id = (int) $variable_post_id[$i];
|
2633 |
+
if ( isset( $_energy_efficiency_class[$i] ) ) {
|
2634 |
+
update_post_meta( $variation_id, '_woosea_energy_efficiency_class', stripslashes( sanitize_text_field( $_energy_efficiency_class[$i] )));
|
2635 |
+
}
|
2636 |
+
|
2637 |
+
// Minimum energy efficiency class
|
2638 |
+
$_min_energy_efficiency_class = $_POST['_woosea_min_energy_efficiency_class'];
|
2639 |
+
$variation_id = (int) $variable_post_id[$i];
|
2640 |
+
if ( isset( $_min_energy_efficiency_class[$i] ) ) {
|
2641 |
+
update_post_meta( $variation_id, '_woosea_min_energy_efficiency_class', stripslashes( sanitize_text_field( $_min_energy_efficiency_class[$i] )));
|
2642 |
+
}
|
2643 |
+
|
2644 |
+
// Maximum energy efficiency class
|
2645 |
+
$_max_energy_efficiency_class = $_POST['_woosea_max_energy_efficiency_class'];
|
2646 |
+
$variation_id = (int) $variable_post_id[$i];
|
2647 |
+
if ( isset( $_max_energy_efficiency_class[$i] ) ) {
|
2648 |
+
update_post_meta( $variation_id, '_woosea_max_energy_efficiency_class', stripslashes( sanitize_text_field( $_max_energy_efficiency_class[$i] )));
|
2649 |
+
}
|
2650 |
+
|
2651 |
+
// Custom field 0
|
2652 |
+
$_custom_field_0 = $_POST['_woosea_custom_field_0'];
|
2653 |
+
$variation_id = (int) $variable_post_id[$i];
|
2654 |
+
if ( isset( $_custom_field_0[$i] ) ) {
|
2655 |
+
update_post_meta( $variation_id, '_woosea_custom_field_0', stripslashes( sanitize_text_field( $_custom_field_0[$i] )));
|
2656 |
+
}
|
2657 |
+
|
2658 |
+
// Custom field 1
|
2659 |
+
$_custom_field_1 = $_POST['_woosea_custom_field_1'];
|
2660 |
+
$variation_id = (int) $variable_post_id[$i];
|
2661 |
+
if ( isset( $_custom_field_1[$i] ) ) {
|
2662 |
+
update_post_meta( $variation_id, '_woosea_custom_field_1', stripslashes( sanitize_text_field( $_custom_field_1[$i] )));
|
2663 |
+
}
|
2664 |
+
|
2665 |
+
// Custom field 2
|
2666 |
+
$_custom_field_2 = $_POST['_woosea_custom_field_2'];
|
2667 |
+
$variation_id = (int) $variable_post_id[$i];
|
2668 |
+
if ( isset( $_custom_field_2[$i] ) ) {
|
2669 |
+
update_post_meta( $variation_id, '_woosea_custom_field_2', stripslashes( sanitize_text_field( $_custom_field_2[$i] )));
|
2670 |
+
}
|
2671 |
+
|
2672 |
+
// Custom field 3
|
2673 |
+
$_custom_field_3 = $_POST['_woosea_custom_field_3'];
|
2674 |
+
$variation_id = (int) $variable_post_id[$i];
|
2675 |
+
if ( isset( $_custom_field_3[$i] ) ) {
|
2676 |
+
update_post_meta( $variation_id, '_woosea_custom_field_3', stripslashes( sanitize_text_field( $_custom_field_3[$i] )));
|
2677 |
+
}
|
2678 |
+
|
2679 |
+
// Custom field 4
|
2680 |
+
$_custom_field_4 = $_POST['_woosea_custom_field_4'];
|
2681 |
+
$variation_id = (int) $variable_post_id[$i];
|
2682 |
+
if ( isset( $_custom_field_4[$i] ) ) {
|
2683 |
+
update_post_meta( $variation_id, '_woosea_custom_field_4', stripslashes( sanitize_text_field( $_custom_field_4[$i] )));
|
2684 |
+
}
|
2685 |
+
|
2686 |
// Exclude product from feed
|
2687 |
if(empty($_POST['_woosea_exclude_product'])){
|
2688 |
$_excludeproduct[$i] = "no";
|
2721 |
$xml = simplexml_load_file($file, 'SimpleXMLElement', LIBXML_NOCDATA);
|
2722 |
|
2723 |
if($project['name'] == "Yandex"){
|
2724 |
+
if(isset($xml->offers->offer)){
|
2725 |
+
$nr_products = count($xml->offers->offer);
|
2726 |
+
}
|
2727 |
} else {
|
2728 |
if ($project['taxonomy'] == "none"){
|
2729 |
$nr_products = count($xml->product);
|
2755 |
}
|
2756 |
add_action( 'woosea_update_project_stats', 'woosea_update_project_history',1,1 );
|
2757 |
|
|
|
2758 |
/**
|
2759 |
* Get the attribute mapping helptexts
|
2760 |
*/
|
2826 |
}
|
2827 |
add_action( 'wp_ajax_woosea_fieldmapping_dialog_helptext', 'woosea_fieldmapping_dialog_helptext' );
|
2828 |
|
|
|
2829 |
/**
|
2830 |
* Get the dropdowns for the fieldmapping page
|
2831 |
*/
|
2951 |
* Some cases are left blank for future steps and pages in the configurations process
|
2952 |
*/
|
2953 |
function woosea_generate_pages(){
|
|
|
2954 |
/**
|
2955 |
* Since WP 4.99 form elements are no longer allowed tags for non-admin users
|
2956 |
* With the function below we add the form elements again to the allowed tags
|
3099 |
case 8:
|
3100 |
load_template( plugin_dir_path( __FILE__ ) . '/pages/admin/woosea-statistics-feed.php' );
|
3101 |
break;
|
3102 |
+
case 9:
|
3103 |
+
load_template( plugin_dir_path( __FILE__ ) . '/pages/admin/woosea-generate-feed-step-9.php' );
|
3104 |
+
break;
|
3105 |
case 100:
|
3106 |
load_template( plugin_dir_path( __FILE__ ) . '/pages/admin/woosea-manage-feed.php' );
|
3107 |
break;
|
3134 |
$license_information = get_option('license_information');
|
3135 |
|
3136 |
$curl = curl_init();
|
3137 |
+
$url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=6.0.0";
|
3138 |
|
3139 |
curl_setopt_array($curl, array(
|
3140 |
CURLOPT_RETURNTRANSFER => 1,
|
3164 |
delete_option ('structured_data_fix');
|
3165 |
delete_option ('add_unique_identifiers');
|
3166 |
delete_option ('add_wpml_support');
|
3167 |
+
delete_option ('add_manipulation_support');
|
3168 |
delete_option ('add_aelia_support');
|
3169 |
} else {
|
3170 |
if(empty($json_return)){
|
3423 |
$batch_project = "batch_project_".$project_hash;
|
3424 |
$val = get_option( $batch_project );
|
3425 |
|
3426 |
+
if ((!empty($val)) AND (is_array($val))){
|
3427 |
$line = new WooSEA_Get_Products;
|
3428 |
$final_creation = $line->woosea_get_products( $val );
|
3429 |
$last_updated = woosea_last_updated( $val['project_hash'] );
|
3486 |
function woosea_blog_widgets() {
|
3487 |
global $wp_meta_boxes;
|
3488 |
|
3489 |
+
add_meta_box('woosea_rss_dashboard_widget', __('Latest Product Feed Pro Tutorials', 'rc_mdm'), 'woosea_my_rss_box','dashboard','side','high');
|
|
|
3490 |
}
|
3491 |
add_action('wp_dashboard_setup', 'woosea_blog_widgets');
|
3492 |
|
3506 |
|
3507 |
// Loop through Feeds
|
3508 |
foreach ( $my_feeds as $feed) :
|
|
|
3509 |
// Get a SimplePie feed object from the specified feed source.
|
3510 |
$rss = fetch_feed( $feed );
|
3511 |
|
3514 |
$rss_title = "";
|
3515 |
|
3516 |
if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly
|
3517 |
+
// Figure out how many total items there are, and choose a limit
|
3518 |
+
$maxitems = $rss->get_item_quantity( 5 );
|
3519 |
|
3520 |
+
// Build an array of all the items, starting with element 0 (first element).
|
3521 |
+
$rss_items = $rss->get_items( 0, $maxitems );
|
3522 |
|
3523 |
+
// Get RSS title
|
3524 |
+
$rss_title = '<a href="'.$rss->get_permalink().'" target="_blank">'.strtoupper( $rss->get_title() ).'</a>';
|
3525 |
+
//endif;
|
3526 |
|
3527 |
+
// Display the container
|
3528 |
+
echo '<div class="rss-widget">';
|
3529 |
+
echo '<strong>'.$rss_title.'</strong>';
|
3530 |
+
echo '<hr style="border: 0; background-color: #DFDFDF; height: 1px;">';
|
3531 |
|
3532 |
+
// Starts items listing within <ul> tag
|
3533 |
+
echo '<ul>';
|
3534 |
|
3535 |
+
// Check items
|
3536 |
+
if ( $maxitems == 0 ) {
|
3537 |
+
echo '<li>'.__( 'No item', 'rc_mdm').'.</li>';
|
3538 |
+
} else {
|
3539 |
+
// Loop through each feed item and display each item as a hyperlink.
|
3540 |
+
foreach ( $rss_items as $item ) :
|
3541 |
+
// Uncomment line below to display non human date
|
3542 |
+
//$item_date = $item->get_date( get_option('date_format').' @ '.get_option('time_format') );
|
3543 |
|
3544 |
+
// Get human date (comment if you want to use non human date)
|
3545 |
+
$item_date = human_time_diff( $item->get_date('U'), current_time('timestamp')).' '.__( 'ago', 'rc_mdm' );
|
3546 |
|
3547 |
+
// Start displaying item content within a <li> tag
|
3548 |
+
echo '<li>';
|
3549 |
+
// create item link
|
3550 |
+
echo '<a href="'.esc_url( $item->get_permalink() ).'?utm_source='.$domain.'&utm_medium=plugin&utm_campaign=dashboard-rss" title="'.$item_date.'" target="_blank">';
|
3551 |
+
// Get item title
|
3552 |
+
echo esc_html( $item->get_title() );
|
3553 |
+
echo '</a>';
|
3554 |
+
// Display date
|
3555 |
+
echo ' <span class="rss-date">'.$item_date.'</span><br />';
|
3556 |
+
// Get item content
|
3557 |
+
$content = $item->get_content();
|
3558 |
+
// Shorten content
|
3559 |
+
$content = wp_html_excerpt($content, 120) . ' [...]';
|
3560 |
+
// Display content
|
3561 |
+
echo $content;
|
3562 |
+
// End <li> tag
|
3563 |
+
echo '</li>';
|
3564 |
+
endforeach;
|
3565 |
+
}
|
3566 |
+
// End <ul> tag
|
3567 |
+
echo '</ul>';
|
3568 |
+
echo '<hr style="border: 0; background-color: #DFDFDF; height: 1px;">';
|
3569 |
+
echo '<a href="https://adtribes.io/tutorials/?utm_source='.$domain.'&utm_medium=plugin&utm_campaign=dashboard-rss" target="_blank">More tutorials on our website</a>';
|
3570 |
+
echo '</div>';
|
3571 |
+
endif;
|
|
|
3572 |
endforeach; // End foreach feed
|
3573 |
}
|
|
|
|
|
3574 |
?>
|