Version Description
(2021-02-14) = * Added: Woo Feed to new name CTX Feed. * Added: Status page new look with all product counter.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.31 |
Comparing to | |
See all releases |
Code changes from version 4.3.30 to 4.3.31
- README.txt +15 -11
- admin/class-woo-feed-admin.php +1 -1
- admin/images/get-woo-feed-pro.svg +97 -31
- admin/images/woo-feed-pro-banner.png +0 -0
- admin/images/woofeed-now-ctxfeed.png +0 -0
- admin/js/woo-feed-admin.min.js +2 -2
- admin/partials/woo-feed-edit-filter.php +1 -1
- admin/partials/woo-feed-settings.php +2 -2
- admin/partials/woo-feed-status.php +52 -49
- includes/class-woo-feed-status.php +544 -0
- includes/class-woo-feed.php +5 -0
- includes/classes/class-woo-feed-admin-message.php +3 -3
- includes/classes/class-woo-feed-products-v3.php +2 -1
- includes/helper.php +64 -52
- includes/log-helper.php +4 -3
- woo-feed.php +4 -3
README.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
===
|
2 |
Contributors: wahid0003, webappick, mhamudul_hk, shuvo586, nayanchamp7
|
3 |
Donate link: https://webappick.com
|
4 |
Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Catalog, Bing Shopping, Instagram Shop, Skroutz Data Feed, xml feed, csv feed, txt feed, woocommerce product feed
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.6.1
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -14,7 +14,7 @@ Generate error-free woocommerce product feed for any marketing channel like Goog
|
|
14 |
== Description ==
|
15 |
Easily create the most optimized and error-free product feeds for your WooCommerce store targeting the leading global and local product marketing channels like Google Shopping or Google Merchant, Facebook Dynamic Product Ads, Instagram Shopping Ads, Pinterest Shopping Ads, eBay Ads, Bing Ads, PriceRunner, Rakuten, PriceSpy, Kelko, and more.
|
16 |
|
17 |
-
**WooCommerce Product Feed Pro (
|
18 |
|
19 |
It aims to reduce your hardship on marketing efforts to create product feeds and distribute them in multiple marketing/shopping channels. There are flexible options to update product information according to your given schedule and sync the update to the right channel via HTTP or FTP. Stay at ease knowing that your customers will automatically get the latest product information.
|
20 |
|
@@ -54,7 +54,7 @@ In a word, WooCommerce Product Feed is a revolution. Yeah, it's a revolution of
|
|
54 |
|
55 |
**EASY USER INTERFACE:**
|
56 |
|
57 |
-
Creating the product feed and navigating the
|
58 |
|
59 |
**PRODUCT TYPES:**
|
60 |
|
@@ -72,7 +72,7 @@ Supports all default WooCommerce product types including bundle product, composi
|
|
72 |
|
73 |
The free version of this product feed plugin automatically adds variable products and product variation. If a variable product has four variations, then the plugin will add five products to the product feed, including one product for the variable product (parent of the variations) and four products for variations.
|
74 |
|
75 |
-
There is an option on the <a target="_blank" href="https://webappick.com/plugin/woocommerce-product-feed-pro/">
|
76 |
|
77 |
**BUILTIN TEMPLATE:**
|
78 |
|
@@ -80,7 +80,7 @@ There are more than 100+ pre-configured templates to give you a quick start. Tho
|
|
80 |
|
81 |
**CUSTOM TEMPLATE:**
|
82 |
|
83 |
-
If a template is not available in our plugin, you can use the Custom Template to create any product feed for any channel. We can also add your channel as a template if you send your channels feed requirements to <a target="_blank" href="https://webappick.com/contact/">
|
84 |
|
85 |
**PRODUCT ATTRIBUTES:**
|
86 |
|
@@ -142,7 +142,7 @@ Categories are the essential key to get products into search results. It is best
|
|
142 |
|
143 |
**BATCH FEED MAKING:**
|
144 |
|
145 |
-
Due to PHP execution time and memory limit, it's not possible to process Thousands of products at a time. We have developed the
|
146 |
|
147 |
**WP OPTIONS:**
|
148 |
|
@@ -170,7 +170,7 @@ Then comes the canonical_link attribute that redirects all the variants to the m
|
|
170 |
|
171 |
**GOOGLE SHIPPING & TAX:**
|
172 |
|
173 |
-
|
174 |
|
175 |
**GOOGLE ANALYTICS UTM PARAMETER:**
|
176 |
|
@@ -212,7 +212,7 @@ Our plugin automatically discounted price applied by any Dynamic Discount & Pric
|
|
212 |
|
213 |
**SEO TITLE & META DESCRIPTION**
|
214 |
|
215 |
-
|
216 |
|
217 |
* <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>.
|
218 |
* <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in one SEO</a>.
|
@@ -233,7 +233,7 @@ The built-in caching feature of our WooCommerce product feed plugin reduces the
|
|
233 |
|
234 |
**PRODUCT BRAND (PRO FEATURE)**
|
235 |
|
236 |
-
|
237 |
|
238 |
* <a target="_blank" href="https://woocommerce.com/products/brands/">WooCommerce Brands</a>
|
239 |
* <a target="_blank" href="https://wordpress.org/plugins/perfect-woocommerce-brands/">Perfect Brands for WooCommerce</a>
|
@@ -450,7 +450,7 @@ e.g.
|
|
450 |
|
451 |
1. Upload `webappick-product-feed-for-woocommerce` folder to the `/wp-content/plugins/` directory
|
452 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
453 |
-
1. Select '
|
454 |
1. Select the template and make feed
|
455 |
1. Done!
|
456 |
|
@@ -498,6 +498,10 @@ Using pro version:
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
|
|
501 |
= 4.3.30 (2021-02-11) =
|
502 |
* Added: WooCommerce latest version(5.0.0) compatibility.
|
503 |
* Tweak: Updated doc links.
|
1 |
+
=== CTX Feed - Generate WooCommerce Product Feed ===
|
2 |
Contributors: wahid0003, webappick, mhamudul_hk, shuvo586, nayanchamp7
|
3 |
Donate link: https://webappick.com
|
4 |
Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Catalog, Bing Shopping, Instagram Shop, Skroutz Data Feed, xml feed, csv feed, txt feed, woocommerce product feed
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.6.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.31
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
14 |
== Description ==
|
15 |
Easily create the most optimized and error-free product feeds for your WooCommerce store targeting the leading global and local product marketing channels like Google Shopping or Google Merchant, Facebook Dynamic Product Ads, Instagram Shopping Ads, Pinterest Shopping Ads, eBay Ads, Bing Ads, PriceRunner, Rakuten, PriceSpy, Kelko, and more.
|
16 |
|
17 |
+
**WooCommerce Product Feed Pro (CTX Feed)** is a WooCommerce product feed generator plugin for WooCommerce powered stores. This plugin currently supports more than 100+ marketing channels. So, you can target your desired marketing channels, price comparison sites, and/or affiliate networks.
|
18 |
|
19 |
It aims to reduce your hardship on marketing efforts to create product feeds and distribute them in multiple marketing/shopping channels. There are flexible options to update product information according to your given schedule and sync the update to the right channel via HTTP or FTP. Stay at ease knowing that your customers will automatically get the latest product information.
|
20 |
|
54 |
|
55 |
**EASY USER INTERFACE:**
|
56 |
|
57 |
+
Creating the product feed and navigating the ctx feed plugin option is easy. Anyone can operate this product feed plugin without having any technical knowledge. You will get all the feed configuration in one window. There is no need to open a separate window to customize any field or option of the plugin.
|
58 |
|
59 |
**PRODUCT TYPES:**
|
60 |
|
72 |
|
73 |
The free version of this product feed plugin automatically adds variable products and product variation. If a variable product has four variations, then the plugin will add five products to the product feed, including one product for the variable product (parent of the variations) and four products for variations.
|
74 |
|
75 |
+
There is an option on the <a target="_blank" href="https://webappick.com/plugin/woocommerce-product-feed-pro/">CTX Feed Pro</a> version there you can exclude the variations or the variable products or you can keep both the variable and product variations.
|
76 |
|
77 |
**BUILTIN TEMPLATE:**
|
78 |
|
80 |
|
81 |
**CUSTOM TEMPLATE:**
|
82 |
|
83 |
+
If a template is not available in our plugin, you can use the Custom Template to create any product feed for any channel. We can also add your channel as a template if you send your channels feed requirements to <a target="_blank" href="https://webappick.com/contact/">ctx feed support team</a>.
|
84 |
|
85 |
**PRODUCT ATTRIBUTES:**
|
86 |
|
142 |
|
143 |
**BATCH FEED MAKING:**
|
144 |
|
145 |
+
Due to PHP execution time and memory limit, it's not possible to process Thousands of products at a time. We have developed the ctx feed plugin with the functionality to make feed with batches. Users can easily set Limit and Offset to make feed. This functionality is compatible with any WordPress Hosting and any number of products you have on your site.
|
146 |
|
147 |
**WP OPTIONS:**
|
148 |
|
170 |
|
171 |
**GOOGLE SHIPPING & TAX:**
|
172 |
|
173 |
+
CTX Feed plugin allows you to place the shipping zone and shipping class accurately so that your Google Shopping product feed includes the correct shipping information (shipping country, region, service, postal_code, price). Our plugin utilizes your configured shipping zone settings for a proper representation. Along with WooCommerce Shipping this WooCommerce Google Product Feed plugin also compatible with <a target="_blank" href="https://codecanyon.net/item/table-rate-shipping-for-woocommerce/3796656">Table Rate Shipping</a> plugin by BolderElement.
|
174 |
|
175 |
**GOOGLE ANALYTICS UTM PARAMETER:**
|
176 |
|
212 |
|
213 |
**SEO TITLE & META DESCRIPTION**
|
214 |
|
215 |
+
CTX Feed plugin is compatible with three top-rated / most popular SEO plugins. You can assign SEO Meta Title and Meta Description instead of Product Title and Description if you want. Supported plugins are:
|
216 |
|
217 |
* <a target="_blank" href="https://wordpress.org/plugins/wordpress-seo/">Yoast SEO</a>.
|
218 |
* <a target="_blank" href="https://wordpress.org/plugins/all-in-one-seo-pack/">All in one SEO</a>.
|
233 |
|
234 |
**PRODUCT BRAND (PRO FEATURE)**
|
235 |
|
236 |
+
CTX Feed Pro plugin has an option to add product brands. You can even add other brand plugins data for brands of your preference. The supported brand plugins are listed below:
|
237 |
|
238 |
* <a target="_blank" href="https://woocommerce.com/products/brands/">WooCommerce Brands</a>
|
239 |
* <a target="_blank" href="https://wordpress.org/plugins/perfect-woocommerce-brands/">Perfect Brands for WooCommerce</a>
|
450 |
|
451 |
1. Upload `webappick-product-feed-for-woocommerce` folder to the `/wp-content/plugins/` directory
|
452 |
1. Activate the plugin through the 'Plugins' menu in WordPress
|
453 |
+
1. Select 'CTX Feed' from admin menu, Click 'Make Feed'
|
454 |
1. Select the template and make feed
|
455 |
1. Done!
|
456 |
|
498 |
|
499 |
== Changelog ==
|
500 |
|
501 |
+
= 4.3.31 (2021-02-14) =
|
502 |
+
* Added: Woo Feed to new name CTX Feed.
|
503 |
+
* Added: Status page new look with all product counter.
|
504 |
+
|
505 |
= 4.3.30 (2021-02-11) =
|
506 |
* Added: WooCommerce latest version(5.0.0) compatibility.
|
507 |
* Tweak: Updated doc links.
|
admin/class-woo-feed-admin.php
CHANGED
@@ -227,7 +227,7 @@ class Woo_Feed_Admin {
|
|
227 |
* class.
|
228 |
*/
|
229 |
if ( function_exists( 'add_options_page' ) ) {
|
230 |
-
add_menu_page( __( '
|
231 |
add_submenu_page( 'webappick-manage-feeds', __( 'Manage Feeds', 'woo-feed' ), __( 'Manage Feeds', 'woo-feed' ), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed' );
|
232 |
add_submenu_page( 'webappick-manage-feeds', __( 'Make Feed', 'woo-feed' ), __( 'Make Feed', 'woo-feed' ), 'manage_woocommerce', 'webappick-new-feed', 'woo_feed_generate_new_feed' );
|
233 |
add_submenu_page( 'webappick-manage-feeds', __( 'Category Mapping', 'woo-feed' ), __( 'Category Mapping', 'woo-feed' ), 'manage_woocommerce', 'webappick-feed-category-mapping', 'woo_feed_category_mapping' );
|
227 |
* class.
|
228 |
*/
|
229 |
if ( function_exists( 'add_options_page' ) ) {
|
230 |
+
add_menu_page( __( 'CTX Feed', 'woo-feed' ), __( 'CTX Feed', 'woo-feed' ), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed', 'dashicons-rss' );
|
231 |
add_submenu_page( 'webappick-manage-feeds', __( 'Manage Feeds', 'woo-feed' ), __( 'Manage Feeds', 'woo-feed' ), 'manage_woocommerce', 'webappick-manage-feeds', 'woo_feed_manage_feed' );
|
232 |
add_submenu_page( 'webappick-manage-feeds', __( 'Make Feed', 'woo-feed' ), __( 'Make Feed', 'woo-feed' ), 'manage_woocommerce', 'webappick-new-feed', 'woo_feed_generate_new_feed' );
|
233 |
add_submenu_page( 'webappick-manage-feeds', __( 'Category Mapping', 'woo-feed' ), __( 'Category Mapping', 'woo-feed' ), 'manage_woocommerce', 'webappick-feed-category-mapping', 'woo_feed_category_mapping' );
|
admin/images/get-woo-feed-pro.svg
CHANGED
@@ -1,31 +1,97 @@
|
|
1 |
-
<?xml version="1.0" encoding="
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 180 42" style="enable-background:new 0 0 180 42;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:url(#SVGID_1_);}
|
7 |
+
.st1{fill:#FFFFFF;}
|
8 |
+
.st2{fill:#FF3355;}
|
9 |
+
.st3{fill:#2E3B50;}
|
10 |
+
</style>
|
11 |
+
<g>
|
12 |
+
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="90" y1="-0.0308" x2="90" y2="41.9692">
|
13 |
+
<stop offset="0" style="stop-color:#FF3355"/>
|
14 |
+
<stop offset="1" style="stop-color:#FF3333"/>
|
15 |
+
</linearGradient>
|
16 |
+
<path class="st0" d="M159,41.97H21c-11.6,0-21-9.4-21-21v0c0-11.6,9.4-21,21-21h138c11.6,0,21,9.4,21,21v0
|
17 |
+
C180,32.57,170.6,41.97,159,41.97z"/>
|
18 |
+
</g>
|
19 |
+
<g>
|
20 |
+
<path class="st1" d="M48.07,13.12h10.68c0.63,0,1.24,0.25,1.68,0.7c0.45,0.45,0.7,1.05,0.7,1.68v14.26c0,0.4-0.16,0.79-0.45,1.08
|
21 |
+
c-0.29,0.29-0.67,0.45-1.08,0.45H48.5c-0.38,0-0.74-0.15-1.01-0.42c-0.27-0.27-0.42-0.63-0.42-1.01V14.1c0-0.26,0.11-0.51,0.3-0.7
|
22 |
+
C47.56,13.22,47.81,13.12,48.07,13.12L48.07,13.12z"/>
|
23 |
+
<path class="st1" d="M61.13,16.32h-1.67c-0.45,0-0.87-0.18-1.19-0.49c-0.31-0.31-0.49-0.74-0.49-1.19v-1.67
|
24 |
+
c0.89,0,1.74,0.35,2.37,0.98C60.77,14.58,61.13,15.43,61.13,16.32L61.13,16.32z"/>
|
25 |
+
<path class="st2" d="M56.11,15.82h-4.02c-0.12,0.01-0.24,0.07-0.32,0.16c-0.08,0.09-0.13,0.21-0.13,0.34
|
26 |
+
c0,0.12,0.05,0.25,0.13,0.34c0.08,0.09,0.2,0.15,0.32,0.16h4.02c0.12-0.01,0.24-0.07,0.32-0.16c0.08-0.09,0.13-0.21,0.13-0.34
|
27 |
+
c0-0.12-0.05-0.25-0.13-0.34C56.35,15.89,56.23,15.83,56.11,15.82z M55.25,25.07h-4.84c-0.13,0-0.26,0.05-0.36,0.15
|
28 |
+
c-0.09,0.09-0.15,0.22-0.15,0.36c0,0.13,0.05,0.26,0.15,0.36c0.09,0.09,0.22,0.15,0.36,0.15h4.84c0.13,0,0.26-0.05,0.36-0.15
|
29 |
+
c0.09-0.09,0.15-0.22,0.15-0.36c0-0.13-0.05-0.26-0.15-0.36C55.51,25.12,55.39,25.07,55.25,25.07z M57.76,22.98h-7.35
|
30 |
+
c-0.12,0.01-0.24,0.07-0.32,0.16c-0.08,0.09-0.13,0.21-0.13,0.34c0,0.12,0.05,0.25,0.13,0.34c0.08,0.09,0.2,0.15,0.32,0.16h7.36
|
31 |
+
c0.12-0.01,0.24-0.07,0.32-0.16c0.08-0.09,0.13-0.21,0.13-0.34c0-0.12-0.05-0.25-0.13-0.34c-0.08-0.09-0.2-0.15-0.32-0.16H57.76z
|
32 |
+
M57.76,20.84h-7.35c-0.12,0.01-0.24,0.07-0.32,0.16c-0.08,0.09-0.13,0.21-0.13,0.34c0,0.12,0.05,0.25,0.13,0.34
|
33 |
+
c0.08,0.09,0.2,0.15,0.32,0.16h7.36c0.12-0.01,0.24-0.07,0.32-0.16c0.08-0.09,0.13-0.21,0.13-0.34c0-0.12-0.05-0.25-0.13-0.34
|
34 |
+
c-0.08-0.09-0.2-0.15-0.32-0.16H57.76z"/>
|
35 |
+
<path class="st3" d="M57.57,15.42c0.1,0.25,0.25,0.47,0.44,0.66c0.19,0.19,0.41,0.34,0.66,0.44c0.25,0.1,0.5,0.15,0.78,0.15l1.67,0
|
36 |
+
c0.07,0,0.14-0.03,0.2-0.06c0.06-0.04,0.11-0.1,0.15-0.17c0.02-0.04,0.03-0.09,0.03-0.17c-0.02-0.78-0.28-1.51-0.74-2.14
|
37 |
+
l-0.09-0.15c-0.06-0.08-0.14-0.16-0.24-0.27c-0.34-0.35-0.75-0.62-1.2-0.81c-0.45-0.19-0.93-0.29-1.42-0.29h-9.09
|
38 |
+
c-0.53,0-1.05,0.21-1.43,0.59c-0.38,0.38-0.6,0.89-0.6,1.43v15.07c0,1.15,0.91,2.03,1.7,2.03h10.68c1.37,0,2.37-0.85,2.37-2.03
|
39 |
+
V18.49c0-0.05-0.01-0.09-0.02-0.14c-0.02-0.04-0.04-0.08-0.08-0.12c-0.03-0.03-0.07-0.06-0.11-0.08c-0.04-0.02-0.09-0.03-0.14-0.03
|
40 |
+
c-0.05,0-0.09,0.01-0.13,0.03c-0.04,0.02-0.08,0.04-0.12,0.08c-0.03,0.03-0.06,0.07-0.08,0.12c-0.02,0.04-0.03,0.09-0.03,0.14
|
41 |
+
v11.21c0,0.78-0.66,1.31-1.64,1.31l-10.74-0.01c-0.27-0.09-0.52-0.26-0.68-0.5c-0.17-0.24-0.26-0.52-0.25-0.8V14.64
|
42 |
+
c0-0.17,0.03-0.34,0.1-0.5c0.07-0.16,0.16-0.3,0.28-0.42c0.12-0.12,0.27-0.22,0.42-0.28c0.16-0.07,0.33-0.1,0.5-0.1h8.68v1.31
|
43 |
+
C57.42,14.91,57.47,15.17,57.57,15.42z M58.14,13.36l0.16,0.03c0.6,0.11,1.15,0.39,1.58,0.82c0.43,0.43,0.72,0.98,0.82,1.58
|
44 |
+
l0.03,0.16l-1.28-0.01h-0.01c-0.17,0-0.34-0.03-0.49-0.1c-0.16-0.06-0.3-0.16-0.43-0.28c-0.12-0.12-0.22-0.27-0.28-0.43
|
45 |
+
c-0.07-0.16-0.1-0.33-0.1-0.5V13.36z"/>
|
46 |
+
<circle class="st2" cx="56.88" cy="25.5" r="0.54"/>
|
47 |
+
</g>
|
48 |
+
<path class="st1" d="M159.75,24.51h-17.43c-0.69,0-1.25-0.56-1.25-1.25v-9.52c0-0.69,0.56-1.25,1.25-1.25h17.43
|
49 |
+
c0.69,0,1.25,0.56,1.25,1.25v9.52C161,23.95,160.44,24.51,159.75,24.51z"/>
|
50 |
+
<g>
|
51 |
+
<path class="st1" d="M25.85,26.85c-0.46,0.61-1.11,1.06-1.93,1.37c-0.82,0.31-1.76,0.47-2.8,0.47c-1.07,0-2.03-0.24-2.85-0.73
|
52 |
+
s-1.47-1.18-1.92-2.09c-0.45-0.91-0.68-1.97-0.7-3.18v-1c0-1.94,0.46-3.45,1.39-4.54c0.93-1.09,2.22-1.63,3.88-1.63
|
53 |
+
c1.43,0,2.56,0.35,3.4,1.06c0.84,0.71,1.34,1.72,1.51,3.05h-2.18c-0.25-1.54-1.14-2.32-2.69-2.32c-1,0-1.76,0.36-2.28,1.08
|
54 |
+
c-0.52,0.72-0.79,1.77-0.81,3.16v0.98c0,1.38,0.29,2.46,0.88,3.22c0.58,0.76,1.4,1.15,2.44,1.15c1.14,0,1.95-0.26,2.43-0.77v-2.5
|
55 |
+
h-2.64v-1.69h4.86V26.85z"/>
|
56 |
+
<path class="st1" d="M32.29,28.69c-1.36,0-2.46-0.43-3.3-1.28s-1.26-1.99-1.26-3.41v-0.26c0-0.95,0.18-1.8,0.55-2.55
|
57 |
+
c0.37-0.75,0.88-1.33,1.55-1.75c0.66-0.42,1.4-0.63,2.22-0.63c1.3,0,2.3,0.41,3.01,1.24c0.71,0.83,1.06,2,1.06,3.51v0.86h-6.23
|
58 |
+
c0.06,0.79,0.33,1.41,0.79,1.87s1.04,0.69,1.74,0.69c0.98,0,1.78-0.4,2.4-1.19l1.15,1.1c-0.38,0.57-0.89,1.01-1.53,1.33
|
59 |
+
C33.8,28.53,33.09,28.69,32.29,28.69z M32.04,20.52c-0.59,0-1.06,0.21-1.42,0.62c-0.36,0.41-0.59,0.98-0.69,1.72H34V22.7
|
60 |
+
c-0.05-0.72-0.24-1.26-0.57-1.62C33.09,20.71,32.63,20.52,32.04,20.52z"/>
|
61 |
+
<path class="st1" d="M40.46,16.67v2.32h1.68v1.59h-1.68v5.32c0,0.36,0.07,0.63,0.22,0.79c0.14,0.16,0.4,0.24,0.77,0.24
|
62 |
+
c0.25,0,0.5-0.03,0.75-0.09v1.66c-0.49,0.13-0.96,0.2-1.41,0.2c-1.64,0-2.47-0.91-2.47-2.72v-5.4h-1.57v-1.59h1.57v-2.32H40.46z"/>
|
63 |
+
<path class="st1" d="M76.23,24.34c-0.13,1.37-0.63,2.44-1.51,3.2c-0.88,0.77-2.05,1.15-3.51,1.15c-1.02,0-1.92-0.24-2.7-0.73
|
64 |
+
s-1.38-1.17-1.8-2.07c-0.42-0.89-0.64-1.93-0.66-3.11v-1.2c0-1.21,0.21-2.28,0.64-3.2s1.04-1.63,1.85-2.13
|
65 |
+
c0.8-0.5,1.73-0.75,2.78-0.75c1.42,0,2.55,0.38,3.42,1.15c0.86,0.77,1.37,1.85,1.51,3.25h-2.22c-0.11-0.92-0.37-1.59-0.81-2
|
66 |
+
s-1.06-0.61-1.9-0.61c-0.97,0-1.71,0.35-2.23,1.06c-0.52,0.71-0.79,1.75-0.8,3.12v1.14c0,1.39,0.25,2.44,0.74,3.17
|
67 |
+
c0.5,0.73,1.22,1.09,2.18,1.09c0.88,0,1.53-0.2,1.97-0.59s0.72-1.05,0.84-1.96H76.23z"/>
|
68 |
+
<path class="st1" d="M87.23,17.49h-4v11.03h-2.21V17.49h-3.96v-1.8h10.17V17.49z"/>
|
69 |
+
<path class="st1" d="M93.33,20.32l2.7-4.63h2.57l-3.88,6.36l3.96,6.47h-2.6l-2.76-4.7l-2.77,4.7h-2.59l3.97-6.47l-3.88-6.36h2.57
|
70 |
+
L93.33,20.32z"/>
|
71 |
+
<path class="st1" d="M107.72,23.1h-5.16v5.42h-2.23V15.69h8.15v1.8h-5.92v3.81h5.16V23.1z"/>
|
72 |
+
<path class="st1" d="M114.04,28.69c-1.36,0-2.46-0.43-3.3-1.28s-1.26-1.99-1.26-3.41v-0.26c0-0.95,0.18-1.8,0.55-2.55
|
73 |
+
c0.37-0.75,0.88-1.33,1.55-1.75c0.66-0.42,1.4-0.63,2.22-0.63c1.3,0,2.3,0.41,3.01,1.24c0.71,0.83,1.06,2,1.06,3.51v0.86h-6.23
|
74 |
+
c0.06,0.79,0.33,1.41,0.79,1.87s1.04,0.69,1.74,0.69c0.98,0,1.78-0.4,2.4-1.19l1.15,1.1c-0.38,0.57-0.89,1.01-1.53,1.33
|
75 |
+
C115.55,28.53,114.84,28.69,114.04,28.69z M113.79,20.52c-0.59,0-1.06,0.21-1.42,0.62c-0.36,0.41-0.59,0.98-0.69,1.72h4.08V22.7
|
76 |
+
c-0.05-0.72-0.24-1.26-0.57-1.62C114.85,20.71,114.38,20.52,113.79,20.52z"/>
|
77 |
+
<path class="st1" d="M123.72,28.69c-1.36,0-2.46-0.43-3.3-1.28s-1.26-1.99-1.26-3.41v-0.26c0-0.95,0.18-1.8,0.55-2.55
|
78 |
+
c0.37-0.75,0.88-1.33,1.55-1.75c0.66-0.42,1.4-0.63,2.22-0.63c1.3,0,2.3,0.41,3.01,1.24c0.71,0.83,1.06,2,1.06,3.51v0.86h-6.23
|
79 |
+
c0.06,0.79,0.33,1.41,0.79,1.87s1.04,0.69,1.74,0.69c0.98,0,1.78-0.4,2.4-1.19l1.15,1.1c-0.38,0.57-0.89,1.01-1.53,1.33
|
80 |
+
C125.23,28.53,124.52,28.69,123.72,28.69z M123.47,20.52c-0.59,0-1.06,0.21-1.42,0.62c-0.36,0.41-0.59,0.98-0.69,1.72h4.08V22.7
|
81 |
+
c-0.05-0.72-0.24-1.26-0.57-1.62C124.53,20.71,124.06,20.52,123.47,20.52z"/>
|
82 |
+
<path class="st1" d="M128.81,23.68c0-1.47,0.34-2.65,1.02-3.54c0.68-0.89,1.59-1.33,2.74-1.33c1.01,0,1.83,0.35,2.45,1.06v-4.88
|
83 |
+
h2.14v13.53h-1.94l-0.11-0.99c-0.64,0.78-1.5,1.16-2.56,1.16c-1.12,0-2.02-0.45-2.71-1.35C129.15,26.44,128.81,25.22,128.81,23.68z
|
84 |
+
M130.95,23.86c0,0.97,0.19,1.72,0.56,2.27s0.9,0.81,1.59,0.81c0.88,0,1.52-0.39,1.92-1.17v-4.07c-0.39-0.76-1.03-1.15-1.9-1.15
|
85 |
+
c-0.69,0-1.23,0.27-1.6,0.82C131.14,21.93,130.95,22.76,130.95,23.86z"/>
|
86 |
+
<path class="st2" d="M144.85,19.73v2.77h-1.3v-7.48h2.86c0.84,0,1.5,0.22,1.99,0.65s0.74,1.01,0.74,1.73c0,0.73-0.24,1.3-0.72,1.71
|
87 |
+
c-0.48,0.41-1.16,0.61-2.02,0.61H144.85z M144.85,18.69h1.56c0.46,0,0.82-0.11,1.06-0.33c0.24-0.22,0.36-0.53,0.36-0.94
|
88 |
+
c0-0.4-0.12-0.73-0.37-0.97c-0.25-0.24-0.58-0.37-1.02-0.37h-1.6V18.69z"/>
|
89 |
+
<path class="st2" d="M153.06,18.09c-0.17-0.03-0.33-0.04-0.51-0.04c-0.57,0-0.96,0.22-1.16,0.66v3.8h-1.25v-5.56h1.19l0.03,0.62
|
90 |
+
c0.3-0.48,0.72-0.72,1.25-0.72c0.18,0,0.33,0.02,0.44,0.07L153.06,18.09z"/>
|
91 |
+
<path class="st2" d="M153.43,19.68c0-0.54,0.11-1.04,0.32-1.47s0.52-0.77,0.91-1.01c0.39-0.23,0.84-0.35,1.35-0.35
|
92 |
+
c0.75,0,1.36,0.24,1.83,0.72c0.47,0.48,0.72,1.12,0.76,1.92l0.01,0.29c0,0.55-0.11,1.04-0.32,1.47c-0.21,0.43-0.51,0.76-0.9,1
|
93 |
+
c-0.39,0.24-0.84,0.35-1.36,0.35c-0.78,0-1.41-0.26-1.88-0.78c-0.47-0.52-0.71-1.22-0.71-2.09V19.68z M154.67,19.79
|
94 |
+
c0,0.57,0.12,1.02,0.35,1.34s0.57,0.49,0.99,0.49s0.75-0.16,0.98-0.49c0.23-0.33,0.35-0.81,0.35-1.44c0-0.56-0.12-1.01-0.36-1.34
|
95 |
+
c-0.24-0.33-0.57-0.49-0.98-0.49c-0.41,0-0.73,0.16-0.97,0.49C154.79,18.66,154.67,19.14,154.67,19.79z"/>
|
96 |
+
</g>
|
97 |
+
</svg>
|
admin/images/woo-feed-pro-banner.png
CHANGED
Binary file
|
admin/images/woofeed-now-ctxfeed.png
ADDED
Binary file
|
admin/js/woo-feed-admin.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,t,i,c){s.fn.disabled=function(n){return s(this).each(function(){var e=s(this),t="disabled";void 0!==e.prop(t)?e.prop(t,void 0===n||!0===n):!0===n?e.addClass(t):e.removeClass(t)}),self},s.fn.isDisabled=function(){var e=s(this),t="disabled";return void 0!==e.prop(t)?e.prop(t):e.hasClass(t)};function e(e){s(e.currentTarget).removeClass(function(e,t){return(t.match(/\btooltipped-\S+/g)||[]).join(" ")}).removeClass("tooltipped").removeAttr("aria-label")}function r(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function o(e,t){return s.extend(!0,{},e,t)}function n(){l=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?l.find("img").hide(0):(l.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;r(e.trigger,(t=e.action,n="cut"===t?"X":"C",/iPhone|iPad/i.test(navigator.userAgent)?"No support :(":/Mac/i.test(navigator.userAgent)?"Press ⌘-"+n+" to "+t:"Press Ctrl-"+n+" to "+t))}).on("success",function(e){r(e.trigger,"Copied!")}))}var l,_,d={in_array:function(e,t){try{return-1!==t.indexOf(e)}catch(e){return!1}},selectize_render_item:function(e,t){return'<div class="item wapk-selectize-item">'.concat(t(e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?c.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,a,r){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||a||9;e.wf_sortable(o({containerSelector:"table",itemPath:"> tbody",itemSelector:"tr",handle:"i.wf_sortedtable",placeholder:'<tr class="placeholder"><td colspan="'.concat(t,'"></td></tr>'),onDrop:function(e,t,n,a){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),r&&"function"==typeof r&&r(e,t,n,a)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(o({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:d.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(o({maxItemShow:3},t))})},reindex_config_table:function(){s("#table-1").find("tbody tr").each(function(n,e){s(e).find("[name]").each(function(e,t){s(t).attr("name",s(t).attr("name").replace(/(\[\d\])/g,"[".concat(n,"]")))})})},common:function(){d.sortable(s(".sorted_table"),{},9,d.reindex_config_table),d.selectize(),d.fancySelect(s(".outputType"))}},f={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(d.common(),s(t).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,r){function e(e){var t;r.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(r[e]),"feed_file_type"===e&&((t=r[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==c.na.toLowerCase()})).length?(a.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!d.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&a.find('option[value="'+t[0]+'"]').attr("selected","selected")):a.find("option").disabled(!1)))}for(var t in r)e(t);n.find(".spinner").removeClass("is-active"),a.disabled(!1),a.trigger("change"),a.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,a){function e(t){if(a.hasOwnProperty(t))if("tabs"===t)n.html(a[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+a[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===a[t]?e.prop("checked",!0):e.val(a[t])}).trigger("change")}}for(var t in a)e(t);f.init()}},u=[],p=[],h=function(){function e(){_classCallCheck(this,e),this._feed=c.generator.feed,this._limit=c.generator.limit,this._progress=0,this._timer=null,this._color=!1,this._total_batch=0,this._current_batch=0,this._product_ids=[],this._progress_per_batch=0,this._refresh=!0,this._regenerate=c.generator.regenerate,a.isRegenerating=!1,this._all_btn=s(".wpf_regenerate"),this._current_btn=s("#".concat(this._feed.replace("wf_config","wf_feed_"))),this._current_btn_label=""}return _createClass(e,[{key:"init",value:function(){var n=this;""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate();var e=a.location.search;return"webappick-manage-feeds"===new URLSearchParams(e).get("page")&&s("body").addClass("woo-import-popup-body"),s(t).on("click",".woo-feed-campaign-close-button",function(e){e.preventDefault(),s(this).parent(".woo-feed-promotion").hide();var t=s(this).data("condition");1===t&&i.post("woo_feed_hide_promotion",{_ajax_nonce:c.nonce,condition:t}).then(function(e){n._log(e)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red"})}),s(t).on("click",".wpf_regenerate",function(e){e.preventDefault(),n._current_btn=s(this),n._current_btn.hasClass("disabled")||!0===a.isRegenerating||(n._feed=n._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==n._feed&&n.generate())}),this}},{key:"_block_button",value:function(){this._all_btn.length&&this._all_btn.addClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").addClass("wpf_spin reverse_spin"),this._current_btn_label=this._current_btn.attr("title"),this._current_btn.attr("aria-label",c.regenerate).attr("title",c.regenerate))}},{key:"_unblock_button",value:function(){this._all_btn.length&&this._all_btn.removeClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").removeClass("wpf_spin"),this._current_btn.find("span").removeClass("reverse_spin"),this._current_btn.attr("aria-label",this._current_btn_label).attr("title",this._current_btn_label))}},{key:"generate",value:function(){var t=this,n=this;a.isRegenerating=!0,this._block_button(),this._resetProgressBar(),this._progressBarActive(),this._log("Counting Total Products"),this._updateProgressStatus("Fetching products."),this._get_product_ids().then(function(e){t._progress=10,n._log({response:e}),e.success?(n._log("Total ".concat(e.total," Products found.")),n._product_ids=e.product,n._total_batch=t._product_ids.length,n._current_batch=0,n._progress_per_batch=(90-t._progress)/t._total_batch,n._process_batch(),n._updateProgressStatus("Processing Products...")):n._updateProgressStatus(e.data.message)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red",setTimeout(function(){n._stopProgressBar(),n._unblock_button()},1500)})}},{key:"_get_product_ids",value:function(){return this._progress=5,i.post("get_product_information",{_ajax_nonce:c.nonce,feed:this._feed,limit:this._limit})}},{key:"_process_batch",value:function(){var t=this,e="Processing Batch ".concat(this._current_batch+1," of ").concat(this._total_batch);this._updateProgressStatus(e),this._log(e),i.post("make_batch_feed",{_ajax_nonce:c.nonce,feed:this._feed,products:this._product_ids[this._current_batch],loop:this._current_batch}).then(function(e){t._current_batch++,t._log("Batch ".concat(t._current_batch," Completed")),t._log(e),t._current_batch<t._total_batch&&(t._process_batch(),t._progress+=t._progress_per_batch),t._current_batch===t._total_batch&&t._save_feed_file()}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_save_feed_file",value:function(){var t=this;this._log("Saving feed file"),this._updateProgressStatus("Saving feed file"),i.post("save_feed_file",{_ajax_nonce:c.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(c.pages.list.feed,"&link=").concat(e.url,"&cat=").concat(e.cat)),setTimeout(function(){t._stopProgressBar(),setTimeout(function(){t._resetProgressBar(!0),t._unblock_button()},3e3)},2500)}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_log",value:function(e){return c.wpf_debug&&console.log(e),this}},{key:"_progressBarActive",value:function(e){var t=0<arguments.length&&void 0!==e?e:0,n=this;return this._toggleProgressBar(!0),this._timer=setInterval(function(){n._updateProgressBar()},t||1e3),this}},{key:"_stopProgressBar",value:function(){return clearInterval(this._timer),this}},{key:"_resetProgressBar",value:function(e){return this._toggleProgressBar(!1),this._updateProgressStatus(""),clearInterval(this._timer),this._color=!1,this._timer=null,this._progress=0,e&&this._updateProgressBar(),this}},{key:"_toggleProgressBar",value:function(e){var t=s("#feed_progress_table");return e?t.show():t.hide(),this}},{key:"_updateProgressStatus",value:function(e){return s(".feed-progress-status").text(e),this}},{key:"_updateProgressBar",value:function(){var e=s(".feed-progress-percentage"),t=s(".feed-progress-bar-fill"),n="".concat(Math.round(this._progress),"%");t.css({width:n}),e.text(n)}}]),e}();a.wf={helper:d,feedEditor:f,generator:h},s(a).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;"edit-feed"===new URLSearchParams(e).get("action")&&s(".itemWrapper").show(),n(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,f.init(),d.common(),s(".wfmasterTooltip").hover(function(){var e=s(this),t=e.attr("wftitle");e.data("tipText",t).removeAttr("wftitle"),s('<p class="wftooltip"></p>').text(t).appendTo("body").fadeIn("slow")},function(){var e=s(this);e.attr("wftitle",e.data("tipText")),s(".wftooltip").remove()}).mousemove(function(e){s(".wftooltip").css({top:e.pageY+10,left:e.pageX+20})}),s(".generateFeed").validate(),s(t).on("click","[data-toggle_slide]",function(e){e.preventDefault(),s(s(this).data("toggle_slide")).slideToggle("fast")}).on("click","#wf_newRow",function(){var e=s("#table-1 tbody"),t=s("#feed_config_template").text().trim().replace(/__idx__/g,e.find("tr").length);e.append(t),d.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(a.location.href=s(this).attr("val"))}).on("click",".wf_clean_cache_wrapper",function(e){e.preventDefault();var t=s(".woo-feed-clean-cache-nonce").val(),n=s(".woo-feed-cache-loader");n.show(),i.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&n.hide()}).fail(function(e){console.log("something wrong")})}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,a=s(this).val(),r=s(this).parents("tr").find(".outputType"),o=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),i=s(this).parents("tr").find(".fancy-picker-data span");""!==a&&-1!==a.indexOf("wf_taxo")&&(t="for_custom_taxo",n="parent_if_empty"),["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax"].includes(a)&&(t="for_price",n="Price"),o.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||o.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(c.form.del_confirm_multi)}).on("change",".dType",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".value_attribute").hide(),n.find(".value_pattern").show()):"attribute"===t?(n.find(".value_attribute").show(),n.find(".value_pattern").hide()):"remove"===t&&(n.find(".value_attribute").hide(),n.find(".value_pattern").hide())}).on("click",".delRow",function(e){e.preventDefault(),s(this).closest("tr").remove(),d.reindex_config_table()}).on("submit","#generateFeed",function(){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(c.form.generate,"</b>"))}).on("submit","#updatefeed",function(e,t){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(t&&t.save?c.form.save:c.form.generate,"</b>"))}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(c.form.sftp_checking),i.post("get_ssh2_status",{_ajax_nonce:c.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(c.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(c.form.sftp_warning)}).fail(function(e){t.hide(),d.ajax_fail(e)})):t.hide()}).on("click",'[name="save_feed_config"]',function(e){e.preventDefault(),s("#updatefeed").trigger("submit",{save:!0})}).on("change","#provider",function(e){e.preventDefault();var t=s(this).val(),n=s("#feedType"),a=s("#providerPage"),r=s("#feed_merchant_info");a.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+c.form.loading_tmpl+"</h3>"),r.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),r.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?f.renderMerchantInfo(r,n,u[t]):i.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,f.renderMerchantInfo(r,n,e)}).fail(d.ajax_fail),p.hasOwnProperty(t)?f.renderMerchantTemplate(a,p[t]):i.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,f.renderMerchantTemplate(a,e),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).fail(d.ajax_fail)}).on("change",".woo_feed_status_input",function(){var e=s(this);i.post("update_feed_status",{_ajax_nonce:c.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(t).on("change",'[name="is_outOfStock"], [name="product_visibility"]',function(){var e=s(".out-of-stock-visibility");"n"===s('[name="is_outOfStock"]:checked').val()&&"1"===s('[name="product_visibility"]:checked').val()?e.show():e.hide()}).on("change",".attr_type",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".wf_attr").hide(),n.find(".wf_attr").val(""),n.find(".wf_default").show()):(n.find(".wf_attr").show(),n.find(".wf_default").hide(),n.find(".wf_default").val(""))}).on("change",".wf_mattributes, .attr_type",function(){var e=s(this).closest("tr"),t=e.find(".wf_mattributes"),n=e.find(".attr_type"),a=e.find("td:eq(4)"),r=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&d.in_array(r,c.form.google_category[t.val()])){if(0===a.find("select.selectize").length){a.find("input.wf_default").remove(),a.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),a.append('<span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">'.concat(c.learn_more,"</a></span>")),_||a.append('<span class="spinner is-active" style="margin: 0;"></span>');var o=a.find(".wf_attributes select");d.selectize(o,{preload:!0,placeholder:c.form.select_category,load:function(e,t){_?t(_):i.send("get_google_categories",{type:"GET",data:{_ajax_nonce:c.nonce,action:"get_google_categories",provider:r}}).then(function(e){t(_=e),a.find(".spinner").remove()}).fail(d.ajax_fail)}})}}else"current_category"!==t.val()&&0===a.find("input.wf_default").length&&(a.find("span").remove(),a.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&a.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(){var e=s("#feedType").val(),t=s("#provider").val(),n=s(".itemWrapper"),a=s(".wf_csvtxt");""!==e&&d.in_array(t,c.form.item_wrapper_hidden)?n.hide():"xml"===e?(n.show(),a.hide()):"csv"===e||"txt"===e?(n.hide(),a.show()):(n.hide(),a.hide())}).trigger("change")})}(jQuery,window,document,wp.ajax,wpf_ajax_obj);
|
2 |
-
//# sourceMappingURL=woo-feed-admin.min.js.map
|
1 |
+
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,t,i,c){s.fn.disabled=function(n){return s(this).each(function(){var e=s(this),t="disabled";void 0!==e.prop(t)?e.prop(t,void 0===n||!0===n):!0===n?e.addClass(t):e.removeClass(t)}),self},s.fn.isDisabled=function(){var e=s(this),t="disabled";return void 0!==e.prop(t)?e.prop(t):e.hasClass(t)};function e(e){s(e.currentTarget).removeClass(function(e,t){return(t.match(/\btooltipped-\S+/g)||[]).join(" ")}).removeClass("tooltipped").removeAttr("aria-label")}function r(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function o(e,t){return s.extend(!0,{},e,t)}function n(){l=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?l.find("img").hide(0):(l.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;r(e.trigger,(t=e.action,n="cut"===t?"X":"C",/iPhone|iPad/i.test(navigator.userAgent)?"No support :(":/Mac/i.test(navigator.userAgent)?"Press ⌘-"+n+" to "+t:"Press Ctrl-"+n+" to "+t))}).on("success",function(e){r(e.trigger,"Copied!")}))}var l,_,d={in_array:function(e,t){try{return-1!==t.indexOf(e)}catch(e){return!1}},selectize_render_item:function(e,t){return'<div class="item wapk-selectize-item">'.concat(t(e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?c.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,a,r){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||a||9;e.wf_sortable(o({containerSelector:"table",itemPath:"> tbody",itemSelector:"tr",handle:"i.wf_sortedtable",placeholder:'<tr class="placeholder"><td colspan="'.concat(t,'"></td></tr>'),onDrop:function(e,t,n,a){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),r&&"function"==typeof r&&r(e,t,n,a)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(o({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:d.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(o({maxItemShow:3},t))})},reindex_config_table:function(){s("#table-1").find("tbody tr").each(function(n,e){s(e).find("[name]").each(function(e,t){s(t).attr("name",s(t).attr("name").replace(/(\[\d\])/g,"[".concat(n,"]")))})})},common:function(){d.sortable(s(".sorted_table"),{},9,d.reindex_config_table),d.selectize(),d.fancySelect(s(".outputType"))}},f={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(d.common(),s(t).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,r){function e(e){var t;r.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(r[e]),"feed_file_type"===e&&((t=r[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==c.na.toLowerCase()})).length?(a.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!d.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&a.find('option[value="'+t[0]+'"]').attr("selected","selected")):a.find("option").disabled(!1)))}for(var t in r)e(t);n.find(".spinner").removeClass("is-active"),a.disabled(!1),a.trigger("change"),a.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,a){function e(t){if(a.hasOwnProperty(t))if("tabs"===t)n.html(a[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+a[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===a[t]?e.prop("checked",!0):e.val(a[t])}).trigger("change")}}for(var t in a)e(t);f.init()}},u=[],p=[],h=function(){function e(){_classCallCheck(this,e),this._feed=c.generator.feed,this._limit=c.generator.limit,this._progress=0,this._timer=null,this._color=!1,this._total_batch=0,this._current_batch=0,this._product_ids=[],this._progress_per_batch=0,this._refresh=!0,this._regenerate=c.generator.regenerate,a.isRegenerating=!1,this._all_btn=s(".wpf_regenerate"),this._current_btn=s("#".concat(this._feed.replace("wf_config","wf_feed_"))),this._current_btn_label=""}return _createClass(e,[{key:"init",value:function(){var n=this;""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate();var e=a.location.search;return"webappick-manage-feeds"===new URLSearchParams(e).get("page")&&s("body").addClass("woo-import-popup-body"),s(t).on("click",".woo-feed-campaign-close-button",function(e){e.preventDefault(),s(this).parent(".woo-feed-promotion").hide();var t=s(this).data("condition");1===t&&i.post("woo_feed_hide_promotion",{_ajax_nonce:c.nonce,condition:t}).then(function(e){n._log(e)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red"})}),s(t).on("click",".wpf_regenerate",function(e){e.preventDefault(),n._current_btn=s(this),n._current_btn.hasClass("disabled")||!0===a.isRegenerating||(n._feed=n._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==n._feed&&n.generate())}),this}},{key:"_block_button",value:function(){this._all_btn.length&&this._all_btn.addClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").addClass("wpf_spin reverse_spin"),this._current_btn_label=this._current_btn.attr("title"),this._current_btn.attr("aria-label",c.regenerate).attr("title",c.regenerate))}},{key:"_unblock_button",value:function(){this._all_btn.length&&this._all_btn.removeClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").removeClass("wpf_spin"),this._current_btn.find("span").removeClass("reverse_spin"),this._current_btn.attr("aria-label",this._current_btn_label).attr("title",this._current_btn_label))}},{key:"generate",value:function(){var t=this,n=this;a.isRegenerating=!0,this._block_button(),this._resetProgressBar(),this._progressBarActive(),this._log("Counting Total Products"),this._updateProgressStatus("Fetching products."),this._get_product_ids().then(function(e){t._progress=10,n._log({response:e}),e.success?(n._log("Total ".concat(e.total," Products found.")),n._product_ids=e.product,n._total_batch=t._product_ids.length,n._current_batch=0,n._progress_per_batch=(90-t._progress)/t._total_batch,n._process_batch(),n._updateProgressStatus("Processing Products...")):n._updateProgressStatus(e.data.message)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red",setTimeout(function(){n._stopProgressBar(),n._unblock_button()},1500)})}},{key:"_get_product_ids",value:function(){return this._progress=5,i.post("get_product_information",{_ajax_nonce:c.nonce,feed:this._feed,limit:this._limit})}},{key:"_process_batch",value:function(){var t=this,e="Processing Batch ".concat(this._current_batch+1," of ").concat(this._total_batch);this._updateProgressStatus(e),this._log(e),i.post("make_batch_feed",{_ajax_nonce:c.nonce,feed:this._feed,products:this._product_ids[this._current_batch],loop:this._current_batch}).then(function(e){t._current_batch++,t._log("Batch ".concat(t._current_batch," Completed")),t._log(e),t._current_batch<t._total_batch&&(t._process_batch(),t._progress+=t._progress_per_batch),t._current_batch===t._total_batch&&t._save_feed_file()}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_save_feed_file",value:function(){var t=this;this._log("Saving feed file"),this._updateProgressStatus("Saving feed file"),i.post("save_feed_file",{_ajax_nonce:c.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(c.pages.list.feed,"&link=").concat(e.url,"&cat=").concat(e.cat)),setTimeout(function(){t._stopProgressBar(),setTimeout(function(){t._resetProgressBar(!0),t._unblock_button()},3e3)},2500)}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_log",value:function(e){return c.wpf_debug&&console.log(e),this}},{key:"_progressBarActive",value:function(e){var t=0<arguments.length&&void 0!==e?e:0,n=this;return this._toggleProgressBar(!0),this._timer=setInterval(function(){n._updateProgressBar()},t||1e3),this}},{key:"_stopProgressBar",value:function(){return clearInterval(this._timer),this}},{key:"_resetProgressBar",value:function(e){return this._toggleProgressBar(!1),this._updateProgressStatus(""),clearInterval(this._timer),this._color=!1,this._timer=null,this._progress=0,e&&this._updateProgressBar(),this}},{key:"_toggleProgressBar",value:function(e){var t=s("#feed_progress_table");return e?t.show():t.hide(),this}},{key:"_updateProgressStatus",value:function(e){return s(".feed-progress-status").text(e),this}},{key:"_updateProgressBar",value:function(){var e=s(".feed-progress-percentage"),t=s(".feed-progress-bar-fill"),n="".concat(Math.round(this._progress),"%");t.css({width:n}),e.text(n)}}]),e}();a.wf={helper:d,feedEditor:f,generator:h},s(a).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;"edit-feed"===new URLSearchParams(e).get("action")&&s(".itemWrapper").show(),n(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,f.init(),d.common(),s(".wfmasterTooltip").hover(function(){var e=s(this),t=e.attr("wftitle");e.data("tipText",t).removeAttr("wftitle"),s('<p class="wftooltip"></p>').text(t).appendTo("body").fadeIn("slow")},function(){var e=s(this);e.attr("wftitle",e.data("tipText")),s(".wftooltip").remove()}).mousemove(function(e){s(".wftooltip").css({top:e.pageY+10,left:e.pageX+20})}),s(".generateFeed").validate(),s(t).on("click","[data-toggle_slide]",function(e){e.preventDefault(),s(s(this).data("toggle_slide")).slideToggle("fast")}).on("click","#wf_newRow",function(){var e=s("#table-1 tbody"),t=s("#feed_config_template").text().trim().replace(/__idx__/g,e.find("tr").length);e.append(t),d.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(a.location.href=s(this).attr("val"))}).on("click",".wf_clean_cache_wrapper",function(e){e.preventDefault();var t=s(".woo-feed-clean-cache-nonce").val(),n=s(".woo-feed-cache-loader");n.show(),i.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&n.hide()}).fail(function(e){console.log("something wrong")})}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,a=s(this).val(),r=s(this).parents("tr").find(".outputType"),o=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),i=s(this).parents("tr").find(".fancy-picker-data span");""!==a&&-1!==a.indexOf("wf_taxo")&&(t="for_custom_taxo",n="parent_if_empty"),["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax"].includes(a)&&(t="for_price",n="Price"),o.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||o.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(c.form.del_confirm_multi)}).on("change",".dType",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".value_attribute").hide(),n.find(".value_pattern").show()):"attribute"===t?(n.find(".value_attribute").show(),n.find(".value_pattern").hide()):"remove"===t&&(n.find(".value_attribute").hide(),n.find(".value_pattern").hide())}).on("click",".delRow",function(e){e.preventDefault(),s(this).closest("tr").remove(),d.reindex_config_table()}).on("submit","#generateFeed",function(){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(c.form.generate,"</b>"))}).on("submit","#updatefeed",function(e,t){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(t&&t.save?c.form.save:c.form.generate,"</b>"))}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(c.form.sftp_checking),i.post("get_ssh2_status",{_ajax_nonce:c.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(c.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(c.form.sftp_warning)}).fail(function(e){t.hide(),d.ajax_fail(e)})):t.hide()}).on("click",'[name="save_feed_config"]',function(e){e.preventDefault(),s("#updatefeed").trigger("submit",{save:!0})}).on("change","#provider",function(e){e.preventDefault();var t=s(this).val(),n=s("#feedType"),a=s("#providerPage"),r=s("#feed_merchant_info");a.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+c.form.loading_tmpl+"</h3>"),r.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),r.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?f.renderMerchantInfo(r,n,u[t]):i.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,f.renderMerchantInfo(r,n,e)}).fail(d.ajax_fail),p.hasOwnProperty(t)?f.renderMerchantTemplate(a,p[t]):i.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,f.renderMerchantTemplate(a,e),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).fail(d.ajax_fail)}).on("change",".woo_feed_status_input",function(){var e=s(this);i.post("update_feed_status",{_ajax_nonce:c.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(t).on("change",'[name="is_outOfStock"], [name="product_visibility"]',function(){var e=s(".out-of-stock-visibility");"n"===s('[name="is_outOfStock"]:checked').val()&&"1"===s('[name="product_visibility"]:checked').val()?e.show():e.hide()}).on("change",".attr_type",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".wf_attr").hide(),n.find(".wf_attr").val(""),n.find(".wf_default").show()):(n.find(".wf_attr").show(),n.find(".wf_default").hide(),n.find(".wf_default").val(""))}).on("change",".wf_mattributes, .attr_type",function(){var e=s(this).closest("tr"),t=e.find(".wf_mattributes"),n=e.find(".attr_type"),a=e.find("td:eq(4)"),r=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&d.in_array(r,c.form.google_category[t.val()])){if(0===a.find("select.selectize").length){a.find("input.wf_default").remove(),a.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),a.append('<span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">'.concat(c.learn_more,"</a></span>")),_||a.append('<span class="spinner is-active" style="margin: 0;"></span>');var o=a.find(".wf_attributes select");d.selectize(o,{preload:!0,placeholder:c.form.select_category,load:function(e,t){_?t(_):i.send("get_google_categories",{type:"GET",data:{_ajax_nonce:c.nonce,action:"get_google_categories",provider:r}}).then(function(e){t(_=e),a.find(".spinner").remove()}).fail(d.ajax_fail)}})}}else"current_category"!==t.val()&&0===a.find("input.wf_default").length&&(a.find("span").remove(),a.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&a.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(){var e=s("#feedType").val(),t=s("#provider").val(),n=s(".itemWrapper"),a=s(".wf_csvtxt");""!==e&&d.in_array(t,c.form.item_wrapper_hidden)?n.hide():"xml"===e?(n.show(),a.hide()):"csv"===e||"txt"===e?(n.hide(),a.show()):(n.hide(),a.hide())}).trigger("change")})}(jQuery,window,document,wp.ajax,wpf_ajax_obj);
|
2 |
+
//# sourceMappingURL=woo-feed-admin.min.js.map
|
admin/partials/woo-feed-edit-filter.php
CHANGED
@@ -88,7 +88,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
88 |
<td>6. Custom Number format.</td>
|
89 |
</tr>
|
90 |
<tr>
|
91 |
-
<td><b>Get →<a style="color: red;" href="https://webappick.com/plugin/woocommerce-product-feed-pro/?utm_source=freePlugin&utm_medium=go_premium&utm_campaign=free_to_pro&utm_term=wooFeed">
|
92 |
</tr>
|
93 |
</table>
|
94 |
</td>
|
88 |
<td>6. Custom Number format.</td>
|
89 |
</tr>
|
90 |
<tr>
|
91 |
+
<td><b>Get →<a style="color: red;" href="https://webappick.com/plugin/woocommerce-product-feed-pro/?utm_source=freePlugin&utm_medium=go_premium&utm_campaign=free_to_pro&utm_term=wooFeed"> CTX Feed Pro</a></b></td>
|
92 |
</tr>
|
93 |
</table>
|
94 |
</td>
|
admin/partials/woo-feed-settings.php
CHANGED
@@ -66,7 +66,7 @@ $settings = woo_feed_get_options( 'all' );
|
|
66 |
<td><label for="opt_in"><?php esc_html_e( 'Send Debug Info', 'woo-feed' ); ?></label></td>
|
67 |
<td>
|
68 |
<label for="opt_in">
|
69 |
-
<input type="checkbox" id="opt_in" name="opt_in" value="on" <?php checked( WooFeedWebAppickAPI::getInstance()->is_tracking_allowed(), true ); ?>> <?php esc_html_e( 'Allow
|
70 |
</label>
|
71 |
<p class="description"><?php esc_html_e( 'To opt out, leave this box unchecked. Your Feed Data remains un-tracked, and no data will be collected. No sensitive data is tracked.', 'woo-feed' ); ?><br><a href="#" data-toggle_slide=".tracker_collection_list"><?php esc_html_e( 'See What We Collect.', 'woo-feed' ); ?></a></p>
|
72 |
<ul class="tracker_collection_list" style="display: none;">
|
@@ -80,7 +80,7 @@ $settings = woo_feed_get_options( 'all' );
|
|
80 |
</td>
|
81 |
</tr>
|
82 |
<tr>
|
83 |
-
<td><label for="cache_ttl"><?php esc_html_e( '
|
84 |
<td>
|
85 |
<select name="cache_ttl" id="cache_ttl">
|
86 |
<?php foreach ( woo_feed_get_cache_ttl_options() as $k => $v ) { ?>
|
66 |
<td><label for="opt_in"><?php esc_html_e( 'Send Debug Info', 'woo-feed' ); ?></label></td>
|
67 |
<td>
|
68 |
<label for="opt_in">
|
69 |
+
<input type="checkbox" id="opt_in" name="opt_in" value="on" <?php checked( WooFeedWebAppickAPI::getInstance()->is_tracking_allowed(), true ); ?>> <?php esc_html_e( 'Allow CTXFeed To Collect Debug Info.', 'woo-feed' ); ?>
|
70 |
</label>
|
71 |
<p class="description"><?php esc_html_e( 'To opt out, leave this box unchecked. Your Feed Data remains un-tracked, and no data will be collected. No sensitive data is tracked.', 'woo-feed' ); ?><br><a href="#" data-toggle_slide=".tracker_collection_list"><?php esc_html_e( 'See What We Collect.', 'woo-feed' ); ?></a></p>
|
72 |
<ul class="tracker_collection_list" style="display: none;">
|
80 |
</td>
|
81 |
</tr>
|
82 |
<tr>
|
83 |
+
<td><label for="cache_ttl"><?php esc_html_e( 'CTXFeed Cache TTL', 'woo-feed' ); ?></label></td>
|
84 |
<td>
|
85 |
<select name="cache_ttl" id="cache_ttl">
|
86 |
<?php foreach ( woo_feed_get_cache_ttl_options() as $k => $v ) { ?>
|
admin/partials/woo-feed-status.php
CHANGED
@@ -3,70 +3,73 @@
|
|
3 |
* Status Page
|
4 |
*
|
5 |
* @link https://webappick.com/
|
6 |
-
* @since
|
7 |
-
* @version
|
8 |
*
|
9 |
* @package Woo_Feed
|
10 |
* @subpackage Woo_Feed/admin/partial
|
11 |
-
* @author Ohidul Islam <
|
12 |
*/
|
13 |
?>
|
14 |
<div class="wrap wapk-admin">
|
15 |
<div class="wapk-section">
|
16 |
<h1 class="wp-heading-inline"><?php esc_html_e( 'System Status', 'woo-feed' ); ?></h1>
|
17 |
<hr class="wp-header-end">
|
18 |
-
<?php
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
37 |
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
?>
|
41 |
<tr data-status="<?php esc_attr($key); ?>">
|
42 |
-
|
43 |
-
|
|
|
44 |
</tr>
|
45 |
-
|
46 |
}
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
<label for="woo-feed-test-options" style="display: none;">Test Option</label>
|
53 |
-
<input type="text" id="woo-feed-test-options" name="woo-feed-test-options" placeholder="option name">
|
54 |
-
<input type="submit" name="woo-feed-test-options-submit" value="Test">
|
55 |
-
</form>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
</tbody>
|
59 |
-
</table>
|
60 |
-
</div>
|
61 |
-
<?php
|
62 |
-
if ( isset( $_POST['woo-feed-test-options-submit'] ) ) {
|
63 |
-
$option_name = sanitize_text_field(wp_unslash($_POST['woo-feed-test-options']));
|
64 |
|
65 |
-
$get_option_val = maybe_unserialize(get_option($option_name));
|
66 |
-
echo "<pre>";
|
67 |
-
print_r($get_option_val);
|
68 |
-
echo "</pre>";
|
69 |
-
}
|
70 |
-
?>
|
71 |
</div>
|
72 |
</div>
|
3 |
* Status Page
|
4 |
*
|
5 |
* @link https://webappick.com/
|
6 |
+
* @since 4.3.31
|
7 |
+
* @version 4.3.31
|
8 |
*
|
9 |
* @package Woo_Feed
|
10 |
* @subpackage Woo_Feed/admin/partial
|
11 |
+
* @author Ohidul Islam < ceo@webappick.com >
|
12 |
*/
|
13 |
?>
|
14 |
<div class="wrap wapk-admin">
|
15 |
<div class="wapk-section">
|
16 |
<h1 class="wp-heading-inline"><?php esc_html_e( 'System Status', 'woo-feed' ); ?></h1>
|
17 |
<hr class="wp-header-end">
|
18 |
+
<?php
|
19 |
+
|
20 |
+
$system_data = new Woo_Feed_Status();
|
21 |
+
|
22 |
+
WPFFWMessage()->displayMessages();
|
23 |
+
|
24 |
+
$status_tab = add_query_arg([
|
25 |
+
'tab' => 'status-tab',
|
26 |
+
],admin_url('admin.php?page=webappick-wp-status'));
|
27 |
+
|
28 |
+
$log_tab = add_query_arg([
|
29 |
+
'tab' => 'log-tab',
|
30 |
+
],admin_url('admin.php?page=webappick-wp-status'));
|
31 |
+
|
32 |
+
$tab_name= isset($_GET['tab'])?sanitize_text_field($_GET['tab']):false; //phpcs:ignore
|
33 |
|
34 |
+
?>
|
35 |
+
|
36 |
+
<h2 class="nav-tab-wrapper">
|
37 |
+
<a href="<?php echo esc_url($status_tab); ?>" class="nav-tab <?php echo esc_html(($tab_name && 'status-tab' === $tab_name) ? 'nav-tab-active' : ''); ?>">Status</a>
|
38 |
+
<a href="<?php echo esc_url($log_tab); ?>" class="nav-tab <?php echo esc_html((isset($tab_name) && 'log-tab' === $tab_name) ? 'nav-tab-active' : ''); ?>">Logs</a>
|
39 |
+
</h2>
|
40 |
|
41 |
+
<?php if ( $tab_name && 'log-tab' === $tab_name ) :?>
|
42 |
+
<br><br>
|
43 |
+
<textarea name="" id="" cols="150" rows="30"><?php echo esc_html($system_data->get_logs()); ?></textarea>
|
44 |
+
<?php else : ?>
|
45 |
+
<br><br>
|
46 |
+
<div class="woo-feed-status-table-wrapper succ">
|
47 |
+
<table class="woo-feed-status-table">
|
48 |
+
<thead>
|
49 |
+
<tr>
|
50 |
+
<th colspan="2"><?php esc_html_e('Environment', 'woo-feed'); ?></th>
|
51 |
+
<th><?php esc_html_e('Message', 'woo-feed'); ?></th>
|
52 |
+
</tr>
|
53 |
+
</thead>
|
54 |
+
<tbody>
|
55 |
+
<?php
|
56 |
+
foreach ( $system_data->get_woo_feed_status() as $key => $woo_feed_status ) {
|
57 |
+
$label = $woo_feed_status['label'];
|
58 |
+
$status_icon = $woo_feed_status['status'];
|
59 |
+
$message = $woo_feed_status['message'];
|
60 |
?>
|
61 |
<tr data-status="<?php esc_attr($key); ?>">
|
62 |
+
<td style="font-weight: bold;width:40%;" ><?php echo esc_attr($label); ?></td>
|
63 |
+
<td style="width: 5%;"><?php echo $status_icon; //phpcs:ignore?></td>
|
64 |
+
<td><?php echo $message; //phpcs:ignore?></td>
|
65 |
</tr>
|
66 |
+
<?php
|
67 |
}
|
68 |
+
?>
|
69 |
+
</tbody>
|
70 |
+
</table>
|
71 |
+
</div>
|
72 |
+
<?php endif; // End of tab condition. ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
</div>
|
75 |
</div>
|
includes/class-woo-feed-status.php
ADDED
@@ -0,0 +1,544 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class Woo_Feed_Status
|
5 |
+
*
|
6 |
+
* @since 5.2.6
|
7 |
+
* @author Ohidul Islam [ceo@webappick.com]
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
class Woo_Feed_Status {
|
11 |
+
|
12 |
+
public $success = '<span style="color: #0a9581" class="dashicons dashicons-yes-alt"></span>';
|
13 |
+
public $warning = '<span style="color: #f8b82d" class="dashicons dashicons-warning"></span>';
|
14 |
+
public $danger = '<span style="color: #f65021" class="dashicons dashicons-dismiss"></span>';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Get Status Page Info
|
18 |
+
* @return array
|
19 |
+
*/
|
20 |
+
public function get_woo_feed_status(){
|
21 |
+
return [
|
22 |
+
$this->woocommerce_version(), // WooCommerce Version
|
23 |
+
$this->total_products(), // Count Total Products
|
24 |
+
$this->product_per_batch(), // Product Per branch
|
25 |
+
$this->php_version(), // PHP Version
|
26 |
+
$this->php_execution_time(), // PHP Execution Version
|
27 |
+
$this->php_memory_limit(), // PHP Memory Limit
|
28 |
+
$this->multi_language(),
|
29 |
+
$this->multi_currency(),
|
30 |
+
$this->wordpress_debug(),
|
31 |
+
$this->wordpress_cron(),
|
32 |
+
$this->upload_dir_writable(),
|
33 |
+
$this->exclude_feed_caching(),
|
34 |
+
$this->wordpress_multisite(),
|
35 |
+
];
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get CTX Feed Log.
|
41 |
+
*/
|
42 |
+
public function get_logs( ) {
|
43 |
+
$fatal_errors = Woo_Feed_Log_Handler_File::get_log_file_path('woo-feed-fatal-errors');
|
44 |
+
|
45 |
+
if ( $fatal_errors ) {
|
46 |
+
return file_get_contents($fatal_errors); //phpcs:ignore
|
47 |
+
}
|
48 |
+
|
49 |
+
return "No Logs Found.";
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get Wordpress.org plugin information.
|
54 |
+
*
|
55 |
+
* @param $slug
|
56 |
+
*
|
57 |
+
* @return false|mixed
|
58 |
+
*/
|
59 |
+
private function plugin_info( $slug ) {
|
60 |
+
|
61 |
+
if ( empty($slug) ) {
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
|
65 |
+
$args = (object) array(
|
66 |
+
'slug' => $slug,
|
67 |
+
'fields' => array(
|
68 |
+
'sections' => false,
|
69 |
+
'screenshots' => false,
|
70 |
+
'versions' => false,
|
71 |
+
),
|
72 |
+
);
|
73 |
+
$request = array(
|
74 |
+
'action' => 'plugin_information',
|
75 |
+
'request' => serialize( $args), //phpcs:ignore
|
76 |
+
);
|
77 |
+
$url = 'http://api.wordpress.org/plugins/info/1.0/';
|
78 |
+
$response = wp_remote_post( $url, array( 'body' => $request ) );
|
79 |
+
|
80 |
+
if ( is_wp_error($response) ) {
|
81 |
+
return false;
|
82 |
+
}
|
83 |
+
return unserialize( $response['body'] ); //phpcs:ignore
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Check WordPress multisite status.
|
91 |
+
*/
|
92 |
+
private function wordpress_multisite( ) {
|
93 |
+
$status = $this->success;
|
94 |
+
$message = 'No';
|
95 |
+
|
96 |
+
if ( defined( 'WOO_FEED_PRO_VERSION' ) && is_multisite() ) {
|
97 |
+
$message = "WordPress Multisite is enabled. If you have hosted your sites into subdomain like fr.example.com then you need a license for each site. If you have five subdomain then you need the Five site license.";
|
98 |
+
}
|
99 |
+
|
100 |
+
return [
|
101 |
+
'label' => 'WordPress Multi Site',
|
102 |
+
'status' => $status,
|
103 |
+
'message' => $message,
|
104 |
+
];
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Get WooCommerce Version Status.
|
109 |
+
*/
|
110 |
+
private function woocommerce_version( ) {
|
111 |
+
$installed_version = (function_exists('WC')) ? WC()->version : '1.0.0';
|
112 |
+
$latest_version = $this->plugin_info('woocommerce');
|
113 |
+
|
114 |
+
if ( version_compare($installed_version,'3.0','<') ) {
|
115 |
+
$status = $this->danger;
|
116 |
+
$message = $installed_version." - You are using a old version of WooCommerce. To use our plugin your WooCommerce version should be 3.0 or later.";
|
117 |
+
}elseif ( version_compare($latest_version->version,$installed_version,'>') ) {
|
118 |
+
$status = $this->warning;
|
119 |
+
$message = $installed_version." - You are not using the latest version of WooCommerce. Update WooCommerce plugin to its latest version: ".$latest_version->version;
|
120 |
+
}else {
|
121 |
+
$status = $this->success;
|
122 |
+
$message = $installed_version." - You are using the latest version of WooCommerce.";
|
123 |
+
}
|
124 |
+
|
125 |
+
return [
|
126 |
+
'label' => 'WooCommerce Version',
|
127 |
+
'status' => $status,
|
128 |
+
'message' => $message,
|
129 |
+
];
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Get PHP Version Status.
|
134 |
+
*/
|
135 |
+
private function php_version( ) {
|
136 |
+
$installed_version = PHP_VERSION;
|
137 |
+
if ( version_compare($installed_version,'5.6','<') ) {
|
138 |
+
$status = $this->danger;
|
139 |
+
$message = $installed_version." - Your PHP version is too old. Too use our plugin";
|
140 |
+
}else {
|
141 |
+
$status = $this->success;
|
142 |
+
$message = $installed_version." - Ok";
|
143 |
+
}
|
144 |
+
|
145 |
+
return [
|
146 |
+
'label' => 'PHP Version',
|
147 |
+
'status' => $status,
|
148 |
+
'message' => $message,
|
149 |
+
];
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Get Multi Language Status.
|
154 |
+
*/
|
155 |
+
private function multi_language( ) {
|
156 |
+
$status = $this->success;
|
157 |
+
$message = "No";
|
158 |
+
$doc = '';
|
159 |
+
$multi_lang_plugin = '';
|
160 |
+
|
161 |
+
/**
|
162 |
+
* polylang/polylang.php Polylang
|
163 |
+
* polylang-pro/polylang.php Polylang Pro
|
164 |
+
* gtranslate/gtranslate.php GTranslate
|
165 |
+
* translatepress-multilingual/index.php TranslatePress - Multilingual
|
166 |
+
* weglot/weglot.php Weglot Translate
|
167 |
+
* google-language-translator/google-language-translator.php Google Language Translator
|
168 |
+
* sitepress-multilingual-cms/sitepress.php WPML Multilingual CMS
|
169 |
+
*/
|
170 |
+
|
171 |
+
if ( is_plugin_active('sitepress-multilingual-cms/sitepress.php') ) {
|
172 |
+
$multi_lang_plugin = 'WPML';
|
173 |
+
$doc = "<br/><br/>You can read this doc about: <a href='https://webappick.com/docs/woo-feed/miscellaneous/how-to-make-feed-for-wpml-languages/'>How to make feed for WPML languages?</a>";
|
174 |
+
}elseif ( is_plugin_active("polylang/polylang.php") ) {
|
175 |
+
$multi_lang_plugin = 'Polylang';
|
176 |
+
$doc = "<br/><br/>You can read this doc about: <a href='https://webappick.com/docs/woo-feed/faq-for-woocommerce-product-feed/how-to-make-feed-for-polylang-languages/'>How to make feed for Polylang languages?</a>";
|
177 |
+
}elseif ( is_plugin_active("polylang-pro/polylang.php") ) {
|
178 |
+
$multi_lang_plugin = 'Polylang Pro';
|
179 |
+
$doc = "<br/><br/>You can read this doc about: <a href='https://webappick.com/docs/woo-feed/faq-for-woocommerce-product-feed/how-to-make-feed-for-polylang-languages/'>How to make feed for Polylang languages?</a>";
|
180 |
+
}elseif ( is_plugin_active('gtranslate/gtranslate.php') ) {
|
181 |
+
$multi_lang_plugin = 'GTranslate';
|
182 |
+
}elseif ( is_plugin_active('translatepress-multilingual/index.php') ) {
|
183 |
+
$multi_lang_plugin = 'TranslatePress - Multilingual';
|
184 |
+
}elseif ( is_plugin_active('weglot/weglot.php') ) {
|
185 |
+
$multi_lang_plugin = 'Weglot Translate';
|
186 |
+
}elseif ( is_plugin_active('google-language-translator/google-language-translator.php') ) {
|
187 |
+
$multi_lang_plugin = 'Google Language Translator';
|
188 |
+
}
|
189 |
+
|
190 |
+
if ( ! empty($multi_lang_plugin) ) {
|
191 |
+
if ( ! in_array($multi_lang_plugin,[ 'WPML', 'Polylang', 'Polylang Pro' ],true) ) {
|
192 |
+
$status = $this->warning;
|
193 |
+
$message = "<b>$multi_lang_plugin</b> is not compatible for multi-language feed. You can not make feed for each language. Supported multi-language plugins are <b>WPML</b> & <b>Polylang</b>.";
|
194 |
+
}elseif ( is_plugin_active('webappick-product-feed-for-woocommerce/woo-feed.php') ) {
|
195 |
+
$status = $this->warning;
|
196 |
+
$message = "You are using <b>$multi_lang_plugin</b> for multi language site. But the free version of this plugin is not compatible with $multi_lang_plugin. Using <a target='_blank' href='https://webappick.com/plugin/woocommerce-product-feed-pro/'><b>Woo Feed Pro</b></a> you can make feed for each language.";
|
197 |
+
$message .= $doc;
|
198 |
+
}else {
|
199 |
+
$message = "<b>$multi_lang_plugin</b>";
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
return [
|
204 |
+
'label' => 'Multi Language Site',
|
205 |
+
'status' => $status,
|
206 |
+
'message' => $message,
|
207 |
+
];
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Get Multi Currency Status.
|
212 |
+
*/
|
213 |
+
private function multi_currency( ) {
|
214 |
+
|
215 |
+
$status = $this->success;
|
216 |
+
$message = "No";
|
217 |
+
$free_version = is_plugin_active( 'webappick-product-feed-for-woocommerce/woo-feed.php' );
|
218 |
+
|
219 |
+
$supported_multi_currency = "Below Multi Currency Plugins are compatible with <a target='_blank' href='https://webappick.com/plugin/woocommerce-product-feed-pro/'><b>Woo Feed Pro</b></a>. ";
|
220 |
+
$supported_multi_currency .= "<br/>";
|
221 |
+
$supported_multi_currency .= "<ul>";
|
222 |
+
$supported_multi_currency .= "<li>☞ <a href='https://aelia.co/shop/currency-switcher-woocommerce/'>Currency Switcher WooCommerce</a> by Aelia</li>";
|
223 |
+
$supported_multi_currency .= "<li>☞ <a href='https://codecanyon.net/item/woocommerce-currency-switcher/8085217'>WooCommerce Currency Switcher</a> by Realmag777</li>";
|
224 |
+
$supported_multi_currency .= "<li>☞ <a href='https://wordpress.org/plugins/woocommerce-multilingual/'>WooCommerce Multilingual</a></li>";
|
225 |
+
$supported_multi_currency .= "<li>☞ <a href='https://wordpress.org/plugins/polylang/'>Polylang</a></li>";
|
226 |
+
$supported_multi_currency .= "<ul/>";
|
227 |
+
|
228 |
+
$multi_currency_plugin = false;
|
229 |
+
if ( is_plugin_active( 'woocommerce-aelia-currencyswitcher/woocommerce-aelia-currencyswitcher.php' ) ) {
|
230 |
+
$multi_currency_plugin = 'Currency Switcher WooCommerce by Aelia';
|
231 |
+
} elseif ( is_plugin_active( 'woocommerce-currency-switcher/index.php' ) ) {
|
232 |
+
$multi_currency_plugin = 'WooCommerce Currency Switcher by Realmag777';
|
233 |
+
} elseif ( is_plugin_active( 'woocommerce-multilingual/wpml-woocommerce.php' ) ) {
|
234 |
+
$multi_currency_plugin = 'WooCommerce Multilingual';
|
235 |
+
} elseif ( is_plugin_active( 'polylang/polylang.php' ) ) {
|
236 |
+
$multi_currency_plugin = 'PolyLang';
|
237 |
+
}elseif ( is_plugin_active( 'polylang-pro/polylang.php' ) ) {
|
238 |
+
$multi_currency_plugin = 'PolyLang Pro';
|
239 |
+
}
|
240 |
+
|
241 |
+
|
242 |
+
if ( 'No' !== $this->multi_language()['message'] ) {
|
243 |
+
if ( $multi_currency_plugin && $free_version ) {
|
244 |
+
$status = $this->warning;
|
245 |
+
$message = "<b>$multi_currency_plugin</b> is installed. Free version of Woo Feed does not support multi currency feed. To make feed for individual currency, you need the <a target='_blank' href='https://webappick.com/plugin/woocommerce-product-feed-pro/'><b>Woo Feed Pro</b>.</a>";
|
246 |
+
}elseif ( $free_version ) {
|
247 |
+
$message = $supported_multi_currency;
|
248 |
+
}elseif ( $multi_currency_plugin ) {
|
249 |
+
$status = $this->success;
|
250 |
+
$message = "<b>$multi_currency_plugin</b><br/><br/>";
|
251 |
+
$message .= $supported_multi_currency;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
return [
|
257 |
+
'label' => 'Multi Currency Site',
|
258 |
+
'status' => $status,
|
259 |
+
'message' => $message,
|
260 |
+
];
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Get PHP Version Status.
|
265 |
+
*/
|
266 |
+
private function wordpress_debug( ) {
|
267 |
+
$message = 'Ok';
|
268 |
+
if ( defined('WP_DEBUG') && ! WP_DEBUG ) {
|
269 |
+
$status = $this->success;
|
270 |
+
$message = "<b>WP_DEBUG</b> is <b>false</b>. If you having any issue with the plugin then set WP_DEBUG to true so that you can find the issue from logs. You can learn more about debugging in WordPress from <a href='https://wordpress.org/support/article/debugging-in-wordpress/'><b>here</b></a>. ";
|
271 |
+
}else {
|
272 |
+
$status = $this->warning;
|
273 |
+
if ( defined('WP_DEBUG_LOG') && ! WP_DEBUG_LOG ) {
|
274 |
+
$message = "<b>WP_DEBUG_LOG</b> is <b>false</b>. Plugin can not write error logs if WP_DEBUG_LOG is set to false. You can learn more about debugging in WordPress from <a href='https://wordpress.org/support/article/debugging-in-wordpress/'><b>here</b></a>";
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
return [
|
279 |
+
'label' => 'WP DEBUG Status',
|
280 |
+
'status' => $status,
|
281 |
+
'message' => $message,
|
282 |
+
];
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Get PHP Version Status.
|
287 |
+
*/
|
288 |
+
private function wordpress_cron( ) {
|
289 |
+
$message = 'Ok';
|
290 |
+
$status = $this->success;
|
291 |
+
if ( true === DISABLE_WP_CRON ) {
|
292 |
+
$status = $this->warning;
|
293 |
+
$message = "WordPress cron is disabled. The <b>Auto Feed Update</b> will not run if WordPress cron is Disabled.";
|
294 |
+
}
|
295 |
+
|
296 |
+
return [
|
297 |
+
'label' => 'WP CRON',
|
298 |
+
'status' => $status,
|
299 |
+
'message' => $message,
|
300 |
+
];
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Get PHP Execution Time.
|
305 |
+
*/
|
306 |
+
private function php_execution_time( ) {
|
307 |
+
$status = $this->success;
|
308 |
+
$time_limit = ini_get('max_execution_time');
|
309 |
+
$message = $time_limit; //TODO message with Detail Explanation
|
310 |
+
|
311 |
+
return [
|
312 |
+
'label' => 'PHP Time Limit',
|
313 |
+
'status' => $status,
|
314 |
+
'message' => $message,
|
315 |
+
];
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
* Get PHP Memory Limit.
|
320 |
+
*/
|
321 |
+
private function php_memory_limit( ) {
|
322 |
+
$status = $this->success;
|
323 |
+
$message = ini_get('memory_limit');
|
324 |
+
|
325 |
+
return [
|
326 |
+
'label' => 'Memory Limit',
|
327 |
+
'status' => $status,
|
328 |
+
'message' => $message,
|
329 |
+
];
|
330 |
+
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Get PHP Version Status.
|
335 |
+
*/
|
336 |
+
private function product_per_batch( ) {
|
337 |
+
$status = $this->success;
|
338 |
+
$settings = maybe_unserialize(get_option('woo_feed_settings'));
|
339 |
+
$message = $settings['per_batch'];
|
340 |
+
//TODO AI Message
|
341 |
+
return [
|
342 |
+
'label' => 'Product Per Batch',
|
343 |
+
'status' => $status,
|
344 |
+
'message' => $message,
|
345 |
+
];
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Get Total Product Status.
|
350 |
+
*/
|
351 |
+
private function total_products( ) {
|
352 |
+
$status = $this->success;
|
353 |
+
$message = '';
|
354 |
+
|
355 |
+
$wc_args = array(
|
356 |
+
'limit' => -1,
|
357 |
+
'offset' => 0,
|
358 |
+
'status' => 'publish',
|
359 |
+
'type' => array( 'simple', 'variable', 'grouped', 'external', 'composite', 'bundle', 'yith_bundle', 'yith-composite', 'subscription', 'variable-subscription', 'woosb' ),
|
360 |
+
'orderby' => 'date',
|
361 |
+
'order' => 'DESC',
|
362 |
+
'return' => 'ids',
|
363 |
+
'suppress_filters' => false,
|
364 |
+
);
|
365 |
+
|
366 |
+
$wp_args = array(
|
367 |
+
'posts_per_page' => - 1,
|
368 |
+
'post_type' => 'product',
|
369 |
+
'post_status' => 'publish',
|
370 |
+
'order' => 'DESC',
|
371 |
+
'fields' => 'ids',
|
372 |
+
'cache_results' => false,
|
373 |
+
'update_post_meta_cache' => false,
|
374 |
+
'update_post_term_cache' => false,
|
375 |
+
'suppress_filters' => false,
|
376 |
+
);
|
377 |
+
|
378 |
+
$wp_query = (new WP_Query($wp_args))->get_posts();
|
379 |
+
$wc_query = (new WC_Product_Query($wc_args))->get_products();
|
380 |
+
|
381 |
+
$wc_query_total_product = count($wc_query);
|
382 |
+
$wp_query_total_product = count($wp_query);
|
383 |
+
|
384 |
+
$both_query = count(array_merge($wp_query,$wc_query));
|
385 |
+
|
386 |
+
// Total Products By WP Query.
|
387 |
+
if ( $wp_query_total_product ) {
|
388 |
+
$message .= "WP Query: ".$wp_query_total_product."<br/>";
|
389 |
+
}
|
390 |
+
|
391 |
+
// Total Products By WC Product Query.
|
392 |
+
if ( $wc_query_total_product ) {
|
393 |
+
$message .= "WC Product Query: ".$wc_query_total_product."<br/>";
|
394 |
+
}
|
395 |
+
|
396 |
+
// Total Products By Both WP Query & WC Product Query.
|
397 |
+
if ( $both_query ) {
|
398 |
+
$message .= "Both Query: ".$both_query."<br/>";
|
399 |
+
}
|
400 |
+
|
401 |
+
$message .= "<br/><b>Product Total by Types.</b><br/>";
|
402 |
+
|
403 |
+
// Product Totals by Product Type (WP Query)
|
404 |
+
$type_totals = $this->get_product_total_by_type();
|
405 |
+
if ( ! empty($type_totals) ) {
|
406 |
+
foreach ( $type_totals as $type => $total ) {
|
407 |
+
$message .= "☞ ". ucwords($type)." Product: ".$total."<br/>";
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
// Total Product Variations (WP Query)
|
412 |
+
$total_variations = $this->get_total_product_variation();
|
413 |
+
if ( $total_variations ) {
|
414 |
+
$message .= "☞ Product Variations: ".$total_variations."<br/>";
|
415 |
+
}
|
416 |
+
|
417 |
+
return [
|
418 |
+
'label' => 'Total Products',
|
419 |
+
'status' => $status,
|
420 |
+
'message' => $message,
|
421 |
+
];
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Count total product variations.
|
426 |
+
* @return int
|
427 |
+
*/
|
428 |
+
private function get_total_product_variation(){
|
429 |
+
$args = array(
|
430 |
+
'posts_per_page' => - 1,
|
431 |
+
'post_type' => 'product_variation',
|
432 |
+
'post_status' => 'publish',
|
433 |
+
'order' => 'DESC',
|
434 |
+
'fields' => 'ids',
|
435 |
+
'cache_results' => false,
|
436 |
+
'update_post_meta_cache' => false,
|
437 |
+
'update_post_term_cache' => false,
|
438 |
+
'suppress_filters' => false,
|
439 |
+
);
|
440 |
+
|
441 |
+
return ( new WP_Query( $args ) )->post_count;
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Count products by type.
|
446 |
+
* @return array
|
447 |
+
*/
|
448 |
+
private function get_product_total_by_type( ) {
|
449 |
+
$product_types = get_terms( 'product_type');
|
450 |
+
$product_count = [];
|
451 |
+
$args = array(
|
452 |
+
'posts_per_page' => - 1,
|
453 |
+
'post_type' => 'product',
|
454 |
+
'post_status' => 'publish',
|
455 |
+
'order' => 'DESC',
|
456 |
+
'fields' => 'ids',
|
457 |
+
'cache_results' => false,
|
458 |
+
'update_post_meta_cache' => false,
|
459 |
+
'update_post_term_cache' => false,
|
460 |
+
'suppress_filters' => false,
|
461 |
+
);
|
462 |
+
if ( ! empty($product_types) ) {
|
463 |
+
foreach ( $product_types as $product_type ) {
|
464 |
+
$args['tax_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query
|
465 |
+
array(
|
466 |
+
'taxonomy' => 'product_type',
|
467 |
+
'field' => 'name',
|
468 |
+
'terms' => $product_type->name,
|
469 |
+
),
|
470 |
+
);
|
471 |
+
$product_count[ $product_type->name ] = (new WP_Query($args))->post_count;
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
return $product_count;
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* @return array
|
480 |
+
*/
|
481 |
+
public function upload_dir_writable() {
|
482 |
+
$status = $this->success;
|
483 |
+
$message = "Ok - Writable.";
|
484 |
+
|
485 |
+
$upload_dir = wp_get_upload_dir();
|
486 |
+
$feed_dir = $upload_dir['basedir']."/woo-feed";
|
487 |
+
if ( ! file_exists($feed_dir) ) {
|
488 |
+
$status = $this->danger;
|
489 |
+
$message = "Upload directory is not writable. Give the <code>wp-content/uploads/</code> directory file write permission so that the plugin can save the feed file.";
|
490 |
+
}
|
491 |
+
return [
|
492 |
+
'label' => 'Upload Directory',
|
493 |
+
'status' => $status,
|
494 |
+
'message' => $message,
|
495 |
+
];
|
496 |
+
}
|
497 |
+
|
498 |
+
/**
|
499 |
+
* Get Caching Status.
|
500 |
+
*/
|
501 |
+
private function exclude_feed_caching( ) {
|
502 |
+
$status = $this->success;
|
503 |
+
$message = "No.";
|
504 |
+
$cache_plugins = array(
|
505 |
+
'breeze/breeze.php' => 'Breeze',
|
506 |
+
'cache-cleaner/cache-cleaner.php' => 'Cache Cleaner - Scheduled',
|
507 |
+
'cache-enabler/cache-enabler.php' => 'Cache Enabler',
|
508 |
+
'cloudflare/cloudflare.php' => 'Cloudflare',
|
509 |
+
'comet-cache/comet-cache.php' => 'Comet Cache',
|
510 |
+
'hummingbird-performance/wp-hummingbird.php' => 'Hummingbird',
|
511 |
+
'hyper-cache/plugin.php' => 'Hyper Cache',
|
512 |
+
'litespeed-cache/litespeed-cache.php' => 'LiteSpeed Cache',
|
513 |
+
'speed-booster-pack/speed-booster-pack.php' => 'Speed Booster Pack',
|
514 |
+
'swift-performance-lite/performance.php' => 'Swift Performance Lite',
|
515 |
+
'w3-total-cache/w3-total-cache.php' => 'W3 Total Cache',
|
516 |
+
'wp-optimize/wp-optimize.php' => 'WP-Optimize - Clean, Compress, Cache',
|
517 |
+
'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php' => 'WP Cloudflare Super Page Cache',
|
518 |
+
'wp-fastest-cache/wpFastestCache.php' => 'WP Fastest Cache',
|
519 |
+
'wp-rocket/wp-rocket.php' => 'WP Rocket',
|
520 |
+
'wp-super-cache/wp-cache.php' => 'WP Super Cache',
|
521 |
+
);
|
522 |
+
$active_plugins = get_option('active_plugins');
|
523 |
+
|
524 |
+
$cache_plugins_installed = false;
|
525 |
+
|
526 |
+
foreach ( $active_plugins as $key => $active_plugin ) {
|
527 |
+
if ( array_key_exists($active_plugin,$cache_plugins) ) {
|
528 |
+
$cache_plugins_installed = $cache_plugins[ $active_plugin ];
|
529 |
+
}
|
530 |
+
}
|
531 |
+
|
532 |
+
if ( $cache_plugins_installed ) {
|
533 |
+
$status = $this->warning;
|
534 |
+
$message = "<b>$cache_plugins_installed</b> plugin is installed on your site. Please make sure that feed file URL or directory is excluded from caching. If not excluded, your feed file may not be updated instantly after feed update. Please read this doc about: <a href='https://webappick.com/docs/woo-feed/faq-for-woocommerce-product-feed/how-to-solve-feed-configuration-not-updating-issue/'>How to exclude feed file URL or Directory from caching?</a>";
|
535 |
+
}
|
536 |
+
|
537 |
+
|
538 |
+
return [
|
539 |
+
'label' => 'Cache Plugin Installed',
|
540 |
+
'status' => $status,
|
541 |
+
'message' => $message,
|
542 |
+
];
|
543 |
+
}
|
544 |
+
}
|
includes/class-woo-feed.php
CHANGED
@@ -148,6 +148,11 @@ class Woo_Feed {
|
|
148 |
* The class is a shipping calculation library
|
149 |
*/
|
150 |
require_once WOO_FEED_FREE_PATH . 'includes/classes/class-woo-feed-shipping.php';
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
/**
|
153 |
* The class responsible for save feed
|
148 |
* The class is a shipping calculation library
|
149 |
*/
|
150 |
require_once WOO_FEED_FREE_PATH . 'includes/classes/class-woo-feed-shipping.php';
|
151 |
+
|
152 |
+
/**
|
153 |
+
* The class is a shipping calculation library
|
154 |
+
*/
|
155 |
+
require_once WOO_FEED_FREE_PATH . 'includes/class-woo-feed-status.php';
|
156 |
|
157 |
/**
|
158 |
* The class responsible for save feed
|
includes/classes/class-woo-feed-admin-message.php
CHANGED
@@ -105,7 +105,7 @@ final class Woo_Feed_Message {
|
|
105 |
<?php if ( 1 !== $hide_promotion && empty($hide_promotion) ) { ?>
|
106 |
<div class="woo-feed-promotion">
|
107 |
<a href="https://webappick.com/plugin/woocommerce-product-feed-pro/">
|
108 |
-
<img src="<?php echo WOO_FEED_PLUGIN_URL; ?>admin/images/woo-feed-black-friday.svg" alt="
|
109 |
</a>
|
110 |
<span class="dashicons dashicons-no-alt woo-feed-campaign-close-button" data-condition="1"></span>
|
111 |
</div>
|
@@ -116,8 +116,8 @@ final class Woo_Feed_Message {
|
|
116 |
<tr>
|
117 |
<th>
|
118 |
<div class="woo-feed-top-header">
|
119 |
-
<a class="get-woo-feed-pro" href="https://webappick.com/plugin/woocommerce-product-feed-pro/?utm_source=freePlugin&utm_medium=go_premium&utm_campaign=free_to_pro&utm_term=wooFeed" target="_blank" aria-label="<?php esc_attr_e( 'Get
|
120 |
-
<img src="<?php echo esc_url( WOO_FEED_PLUGIN_URL ); ?>admin/images/get-woo-feed-pro.svg" alt="<?php esc_attr_e( 'Get
|
121 |
</a>
|
122 |
<div class="woo-feed-top-buttons">
|
123 |
<a class="woo-feed-doc-link" href="<?php echo esc_url($doc_link); ?>" target="_blank" ><span class="dashicons dashicons-book"></span> <?php esc_html_e( 'Documentation', 'woo-feed' ); ?></a>
|
105 |
<?php if ( 1 !== $hide_promotion && empty($hide_promotion) ) { ?>
|
106 |
<div class="woo-feed-promotion">
|
107 |
<a href="https://webappick.com/plugin/woocommerce-product-feed-pro/">
|
108 |
+
<img src="<?php echo WOO_FEED_PLUGIN_URL; ?>admin/images/woo-feed-black-friday.svg" alt="CTX Feed Pro Black Friday">
|
109 |
</a>
|
110 |
<span class="dashicons dashicons-no-alt woo-feed-campaign-close-button" data-condition="1"></span>
|
111 |
</div>
|
116 |
<tr>
|
117 |
<th>
|
118 |
<div class="woo-feed-top-header">
|
119 |
+
<a class="get-woo-feed-pro" href="https://webappick.com/plugin/woocommerce-product-feed-pro/?utm_source=freePlugin&utm_medium=go_premium&utm_campaign=free_to_pro&utm_term=wooFeed" target="_blank" aria-label="<?php esc_attr_e( 'Get CTX Feed Pro', 'woo-feed' ); ?>">
|
120 |
+
<img src="<?php echo esc_url( WOO_FEED_PLUGIN_URL ); ?>admin/images/get-woo-feed-pro.svg" alt="<?php esc_attr_e( 'Get CTX Feed Pro', 'woo-feed' ); ?>">
|
121 |
</a>
|
122 |
<div class="woo-feed-top-buttons">
|
123 |
<a class="woo-feed-doc-link" href="<?php echo esc_url($doc_link); ?>" target="_blank" ><span class="dashicons dashicons-book"></span> <?php esc_html_e( 'Documentation', 'woo-feed' ); ?></a>
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -1303,7 +1303,8 @@ class Woo_Feed_Products_v3
|
|
1303 |
$datetime_now = date('Y-m-d H:i:s', strtotime( current_time( 'mysql' ) ) ); // {DateTimeNow}
|
1304 |
$blog_name = get_bloginfo('name'); // {BlogName}
|
1305 |
$blog_url = get_bloginfo('url'); // {BlogURL}
|
1306 |
-
|
|
|
1307 |
$blog_email = get_bloginfo('admin_email'); // {BlogEmail}
|
1308 |
|
1309 |
$this->xml_wrapper['header'] = str_replace(
|
1303 |
$datetime_now = date('Y-m-d H:i:s', strtotime( current_time( 'mysql' ) ) ); // {DateTimeNow}
|
1304 |
$blog_name = get_bloginfo('name'); // {BlogName}
|
1305 |
$blog_url = get_bloginfo('url'); // {BlogURL}
|
1306 |
+
//$blog_desc = get_bloginfo('description'); // {BlogDescription}
|
1307 |
+
$blog_desc = "CTX Feed - This product feed is generated with the CTX Feed - WooCommerce Product Feed Generator plugin by WebAppick.com. For all your support questions check out our plugin Docs on https://webappick.com/docs or e-mail to: support@webappick.com"; // {BlogDescription}
|
1308 |
$blog_email = get_bloginfo('admin_email'); // {BlogEmail}
|
1309 |
|
1310 |
$this->xml_wrapper['header'] = str_replace(
|
includes/helper.php
CHANGED
@@ -233,6 +233,45 @@ if ( ! function_exists( 'wooFeed_Admin_Notices' ) ) {
|
|
233 |
}
|
234 |
}
|
235 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
if ( ! function_exists( 'woo_feed_progress_bar' ) ) {
|
237 |
/**
|
238 |
* Feed Progress Bar
|
@@ -2536,7 +2575,6 @@ if ( ! function_exists( 'woo_feed_filter_parsed_rules' ) ) {
|
|
2536 |
return $rules;
|
2537 |
}
|
2538 |
}
|
2539 |
-
|
2540 |
if ( ! function_exists( 'woo_feed_category_mapping' ) ) {
|
2541 |
/**
|
2542 |
* Category Mapping
|
@@ -2688,7 +2726,6 @@ if ( ! function_exists( 'woo_feed_get_category_mapping_value' ) ) {
|
|
2688 |
}
|
2689 |
}
|
2690 |
|
2691 |
-
|
2692 |
if ( ! function_exists( 'woo_feed_add_identifier_fields' ) ) {
|
2693 |
/**
|
2694 |
* Add Custom fields into product inventory tab for Unique Identifier (GTIN,MPN,EAN)
|
@@ -2884,7 +2921,6 @@ if ( ! function_exists( 'woo_feed_save_identifier_fields_data_for_variation' ) )
|
|
2884 |
add_action( 'woocommerce_save_product_variation', 'woo_feed_save_identifier_fields_data_for_variation', 10, 2 );
|
2885 |
}
|
2886 |
|
2887 |
-
|
2888 |
if ( ! function_exists( 'woo_feed_clear_cache_button' ) ) {
|
2889 |
/**
|
2890 |
* Clear cache button.
|
@@ -2957,6 +2993,7 @@ if ( ! function_exists('woo_feed_get_terms_list_hierarchical_order') ) {
|
|
2957 |
|
2958 |
return implode(">", $product_terms_names);
|
2959 |
} // end if terms
|
|
|
2960 |
}
|
2961 |
}
|
2962 |
|
@@ -3034,59 +3071,34 @@ if ( ! function_exists( 'woo_feed_get_approved_reviews_data' ) ) {
|
|
3034 |
}
|
3035 |
}
|
3036 |
|
3037 |
-
|
3038 |
-
if ( ! function_exists('woo_feed_get_system_status') ) {
|
3039 |
/**
|
3040 |
-
*
|
3041 |
*
|
3042 |
-
* @
|
3043 |
-
*
|
|
|
|
|
3044 |
*/
|
3045 |
-
function
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
);
|
3060 |
-
|
3061 |
-
$products = get_posts( $args );
|
3062 |
-
$total_product = count($products);
|
3063 |
-
|
3064 |
-
//get variations products
|
3065 |
-
$args = array(
|
3066 |
-
'post_type' => 'product_variation',
|
3067 |
-
'post_status' => array( 'publish' ),
|
3068 |
-
);
|
3069 |
-
|
3070 |
-
$variations = get_posts( $args );
|
3071 |
-
$total_variations = count($variations);
|
3072 |
-
|
3073 |
-
$system_data = array(
|
3074 |
-
'wp_version' => array( 'Wordpress Version' => $wp_version ),
|
3075 |
-
'woocommerce_version' => array( 'WooCommerce Version' => $wc_version ),
|
3076 |
-
'php_version' => array( 'PHP Version' => phpversion() ),
|
3077 |
-
'wp_memory_limit' => array( 'Wordpress Memory Limit' => $wp_memory_limit ),
|
3078 |
-
'php_time_limit' => array( 'PHP Time Limit' => $php_time_limit ),
|
3079 |
-
'wp_debug_mode' => array( 'Wordpress Debug Mode' => WP_DEBUG ),
|
3080 |
-
'plugin_version' => array( 'WooFeed Version' => WOO_FEED_FREE_VERSION ),
|
3081 |
-
'total_product' => array( 'Total Product' => $total_product ),
|
3082 |
-
'total_variation_product' => array( 'Total Variation Product' => $total_variations ),
|
3083 |
-
);
|
3084 |
}
|
3085 |
-
|
3086 |
-
return apply_filters('woo_feed_config_status', $system_data);
|
3087 |
-
|
3088 |
}
|
3089 |
}
|
|
|
3090 |
|
3091 |
if ( ! function_exists( 'woo_feed_hide_promotion' ) ) {
|
3092 |
/**
|
@@ -3147,9 +3159,9 @@ if ( ! function_exists( 'woo_feed_brand_taxonomy' ) ) {
|
|
3147 |
}
|
3148 |
|
3149 |
$labels = array(
|
3150 |
-
'name' => 'Brand by
|
3151 |
'singular_name' => 'Brand',
|
3152 |
-
'menu_name' => 'Brand by
|
3153 |
'all_items' => 'All Brands',
|
3154 |
'parent_item' => 'Parent Brand',
|
3155 |
'parent_item_colon' => 'Parent Brand:',
|
233 |
}
|
234 |
}
|
235 |
}
|
236 |
+
if ( ! function_exists( 'wooFeed_To_ctxFeed' ) ) {
|
237 |
+
/**
|
238 |
+
* Woo Feed To CTX Feed
|
239 |
+
*
|
240 |
+
* @since 4.3.31
|
241 |
+
* @author Nazrul Islam Nayan
|
242 |
+
*/
|
243 |
+
function wooFeed_To_ctxFeed() {
|
244 |
+
$user_id = get_current_user_id();
|
245 |
+
if ( ! get_user_meta( $user_id, 'woo_feed_ctx_startup_notice_dismissed' ) ) {
|
246 |
+
ob_start();
|
247 |
+
?>
|
248 |
+
<script type="text/javascript">
|
249 |
+
(function($) {
|
250 |
+
$(document).on('click', '.woo-feed-ctx-startup-notice button.notice-dismiss', function (e) {
|
251 |
+
e.preventDefault();
|
252 |
+
let nonce = $('#woo_feed_to_ctx_feed_nonce').val();
|
253 |
+
|
254 |
+
//woo feed to ctx feed notice cancel callback
|
255 |
+
wp.ajax.post( 'woo_feed_to_ctx_feed_notice', {
|
256 |
+
_wp_ajax_nonce: nonce,
|
257 |
+
clicked: true,
|
258 |
+
}).then( response => {
|
259 |
+
console.log( response );
|
260 |
+
}).fail( error => {
|
261 |
+
console.log( error );
|
262 |
+
});
|
263 |
+
});
|
264 |
+
})(jQuery)
|
265 |
+
</script>
|
266 |
+
<div class="notice woo-feed-ctx-startup-notice is-dismissible"
|
267 |
+
style="background: url(<?php echo WOO_FEED_PLUGIN_URL . "admin/images/woofeed-now-ctxfeed.png" ; ?>) no-repeat center 70%;height: 195px;background-size: cover;border: none;">
|
268 |
+
<input type="hidden" id="woo_feed_to_ctx_feed_nonce" value="<?php echo wp_create_nonce('woo-feed-to-ctx-feed-notice'); ?>">
|
269 |
+
</div>
|
270 |
+
<?php
|
271 |
+
$image = ob_get_contents();
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
if ( ! function_exists( 'woo_feed_progress_bar' ) ) {
|
276 |
/**
|
277 |
* Feed Progress Bar
|
2575 |
return $rules;
|
2576 |
}
|
2577 |
}
|
|
|
2578 |
if ( ! function_exists( 'woo_feed_category_mapping' ) ) {
|
2579 |
/**
|
2580 |
* Category Mapping
|
2726 |
}
|
2727 |
}
|
2728 |
|
|
|
2729 |
if ( ! function_exists( 'woo_feed_add_identifier_fields' ) ) {
|
2730 |
/**
|
2731 |
* Add Custom fields into product inventory tab for Unique Identifier (GTIN,MPN,EAN)
|
2921 |
add_action( 'woocommerce_save_product_variation', 'woo_feed_save_identifier_fields_data_for_variation', 10, 2 );
|
2922 |
}
|
2923 |
|
|
|
2924 |
if ( ! function_exists( 'woo_feed_clear_cache_button' ) ) {
|
2925 |
/**
|
2926 |
* Clear cache button.
|
2993 |
|
2994 |
return implode(">", $product_terms_names);
|
2995 |
} // end if terms
|
2996 |
+
return false;
|
2997 |
}
|
2998 |
}
|
2999 |
|
3071 |
}
|
3072 |
}
|
3073 |
|
3074 |
+
if ( ! function_exists( 'woo_feed_to_ctx_feed_notice' ) ) {
|
|
|
3075 |
/**
|
3076 |
+
* Update user meta to work ctx startup notice once.
|
3077 |
*
|
3078 |
+
* @param int _ajax_nonce nonce number.
|
3079 |
+
*
|
3080 |
+
* @since 4.3.31
|
3081 |
+
* @author Nazrul Islam Nayan
|
3082 |
*/
|
3083 |
+
function woo_feed_to_ctx_feed_notice() {
|
3084 |
+
if ( isset( $_REQUEST['_wp_ajax_nonce'] ) && wp_verify_nonce( wp_unslash($_REQUEST['_wp_ajax_nonce']), 'woo-feed-to-ctx-feed-notice') ) { //phpcs:ignore
|
3085 |
+
$user_id = get_current_user_id();
|
3086 |
+
if ( isset( $_REQUEST['clicked'] ) ) {
|
3087 |
+
$updated_user_meta = add_user_meta( $user_id, 'woo_feed_ctx_startup_notice_dismissed', 'true', true );
|
3088 |
+
|
3089 |
+
if ( $updated_user_meta ) {
|
3090 |
+
wp_send_json_success( esc_html__( 'User meta updated successfully.', 'woo-feed' ) );
|
3091 |
+
}else {
|
3092 |
+
wp_send_json_error( esc_html__( 'Something is wrong.', 'woo-feed' ) );
|
3093 |
+
}
|
3094 |
+
}
|
3095 |
+
} else {
|
3096 |
+
wp_send_json_error( esc_html__( 'Invalid Request.', 'woo-feed' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3097 |
}
|
3098 |
+
wp_die();
|
|
|
|
|
3099 |
}
|
3100 |
}
|
3101 |
+
add_action('wp_ajax_woo_feed_to_ctx_feed_notice', 'woo_feed_to_ctx_feed_notice');
|
3102 |
|
3103 |
if ( ! function_exists( 'woo_feed_hide_promotion' ) ) {
|
3104 |
/**
|
3159 |
}
|
3160 |
|
3161 |
$labels = array(
|
3162 |
+
'name' => 'Brand by CTX Feed',
|
3163 |
'singular_name' => 'Brand',
|
3164 |
+
'menu_name' => 'Brand by CTX Feed',
|
3165 |
'all_items' => 'All Brands',
|
3166 |
'parent_item' => 'Parent Brand',
|
3167 |
'parent_item_colon' => 'Parent Brand:',
|
includes/log-helper.php
CHANGED
@@ -174,9 +174,10 @@ if ( ! function_exists( 'woo_feed_delete_log' ) ) {
|
|
174 |
$log_handler = new WC_Log_Handler_File();
|
175 |
$log_handler->remove( false === $handle ? WC_Log_Handler_File::get_log_file_name( $source ) : $source );
|
176 |
}
|
177 |
-
}
|
178 |
-
|
179 |
-
|
|
|
180 |
} catch ( Exception $e ) {
|
181 |
return false;
|
182 |
}
|
174 |
$log_handler = new WC_Log_Handler_File();
|
175 |
$log_handler->remove( false === $handle ? WC_Log_Handler_File::get_log_file_name( $source ) : $source );
|
176 |
}
|
177 |
+
}elseif ( class_exists( 'Woo_Feed_Log_Handler_File', false ) ) {
|
178 |
+
$feed_log_handler = new Woo_Feed_Log_Handler_File();
|
179 |
+
return $feed_log_handler->remove( false == $handle ? Woo_Feed_Log_Handler_File::get_log_file_name( $source ) : $source );
|
180 |
+
}
|
181 |
} catch ( Exception $e ) {
|
182 |
return false;
|
183 |
}
|
woo-feed.php
CHANGED
@@ -7,10 +7,10 @@
|
|
7 |
* @package Woo_Feed
|
8 |
*
|
9 |
* @wordpress-plugin
|
10 |
-
* Plugin Name:
|
11 |
* Plugin URI: https://webappick.com/
|
12 |
* Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
|
13 |
-
* Version: 4.3.
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
@@ -38,7 +38,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
|
|
38 |
* @var string
|
39 |
* @since 3.1.6
|
40 |
*/
|
41 |
-
define( 'WOO_FEED_FREE_VERSION', '4.3.
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
@@ -174,6 +174,7 @@ if ( ! function_exists( 'run_woo_feed' ) ) {
|
|
174 |
*/
|
175 |
add_action( 'plugins_loaded', [ $plugin, 'run' ], PHP_INT_MAX );
|
176 |
add_action( 'admin_notices', 'wooFeed_Admin_Notices' );
|
|
|
177 |
WooFeedWebAppickAPI::getInstance();
|
178 |
}
|
179 |
|
7 |
* @package Woo_Feed
|
8 |
*
|
9 |
* @wordpress-plugin
|
10 |
+
* Plugin Name: CTX Feed
|
11 |
* Plugin URI: https://webappick.com/
|
12 |
* Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
|
13 |
+
* Version: 4.3.31
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
38 |
* @var string
|
39 |
* @since 3.1.6
|
40 |
*/
|
41 |
+
define( 'WOO_FEED_FREE_VERSION', '4.3.31' );
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
174 |
*/
|
175 |
add_action( 'plugins_loaded', [ $plugin, 'run' ], PHP_INT_MAX );
|
176 |
add_action( 'admin_notices', 'wooFeed_Admin_Notices' );
|
177 |
+
add_action( 'admin_notices', 'wooFeed_To_ctxFeed' );
|
178 |
WooFeedWebAppickAPI::getInstance();
|
179 |
}
|
180 |
|