Version Description
(2021-03-11) = * Fixed: Facebook pixel issue solved.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.46 |
Comparing to | |
See all releases |
Code changes from version 4.3.45 to 4.3.46
- README.txt +5 -2
- admin/class-woo-feed-option-list.php +4 -4
- admin/partials/woo-feed-settings.php +19 -0
- includes/class-woo-feed-docs.php +1 -1
- includes/classes/class-woo-feed-admin-message.php +3 -3
- includes/classes/class-woo-feed-default-attributes.php +142 -142
- includes/classes/class-woo-feed-dropdown.php +5 -5
- includes/classes/class-woo-feed-products-v3.php +4 -4
- includes/classes/class-woo-feed-webappick-api.php +5 -5
- includes/helper.php +150 -103
- woo-feed.php +14 -14
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
|
|
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 |
|
@@ -498,8 +498,11 @@ Using pro version:
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
501 |
= 4.3.45 (2021-03-10) =
|
502 |
-
*
|
503 |
|
504 |
= 4.3.44 (2021-03-09) =
|
505 |
* Added: Modalova template added.
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.6.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.46
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
498 |
|
499 |
== Changelog ==
|
500 |
|
501 |
+
= 4.3.46 (2021-03-11) =
|
502 |
+
* Fixed: Facebook pixel issue solved.
|
503 |
+
|
504 |
= 4.3.45 (2021-03-10) =
|
505 |
+
* Fixed: Modify modalova template attributes.
|
506 |
|
507 |
= 4.3.44 (2021-03-09) =
|
508 |
* Added: Modalova template added.
|
admin/class-woo-feed-option-list.php
CHANGED
@@ -242,10 +242,10 @@ class Woo_Feed_Option_list extends Woo_Feed_List_Table {
|
|
242 |
*/
|
243 |
function get_columns() {
|
244 |
$columns = array(
|
245 |
-
'cb'
|
246 |
-
'option_name'
|
247 |
'option_value' => __( 'Option Value', 'woo-feed' ),
|
248 |
-
'action'
|
249 |
);
|
250 |
|
251 |
return $columns;
|
@@ -268,7 +268,7 @@ class Woo_Feed_Option_list extends Woo_Feed_List_Table {
|
|
268 |
**************************************************************************/
|
269 |
function get_sortable_columns() {
|
270 |
$sortable_columns = array(
|
271 |
-
'option_name'
|
272 |
'option_value' => array( 'option_value', false ),
|
273 |
);
|
274 |
|
242 |
*/
|
243 |
function get_columns() {
|
244 |
$columns = array(
|
245 |
+
'cb' => '<input type="checkbox" />', // Render a checkbox instead of text
|
246 |
+
'option_name' => __( 'Option Name', 'woo-feed' ),
|
247 |
'option_value' => __( 'Option Value', 'woo-feed' ),
|
248 |
+
'action' => __( 'Action', 'woo-feed' ),
|
249 |
);
|
250 |
|
251 |
return $columns;
|
268 |
**************************************************************************/
|
269 |
function get_sortable_columns() {
|
270 |
$sortable_columns = array(
|
271 |
+
'option_name' => array( 'option_name', false ),
|
272 |
'option_value' => array( 'option_value', false ),
|
273 |
);
|
274 |
|
admin/partials/woo-feed-settings.php
CHANGED
@@ -129,6 +129,25 @@ $settings = woo_feed_get_options( 'all' );
|
|
129 |
<p class="description"><?php esc_html_e( 'Disables or Enables Brand', 'woo-feed' ); ?></p>
|
130 |
</td>
|
131 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
<tr>
|
133 |
<th scope="row"><label for="allow_all_shipping"><?php esc_html_e( 'Add shipping costs for all countries to feed (Google Shopping / Facebook only)', 'woo-feed' ); ?></label></th>
|
134 |
<td>
|
129 |
<p class="description"><?php esc_html_e( 'Disables or Enables Brand', 'woo-feed' ); ?></p>
|
130 |
</td>
|
131 |
</tr>
|
132 |
+
<tr>
|
133 |
+
<td><label for="disable_pixel"><?php esc_html_e( 'Disable/Enable Facebook Pixel', 'woo-feed' ); ?></label></td>
|
134 |
+
<td>
|
135 |
+
<label for="disable_pixel">
|
136 |
+
<select name="disable_pixel" id="disable_pixel">
|
137 |
+
<option value="disable"<?php selected( $settings['disable_pixel'], 'disable' ); ?>><?php esc_html_e( 'Disabled', 'woo-feed' ); ?></option>
|
138 |
+
<option value="enable"<?php selected( $settings['disable_pixel'], 'enable' ); ?>><?php esc_html_e( 'Enabled', 'woo-feed' ); ?></option>
|
139 |
+
</select>
|
140 |
+
</label>
|
141 |
+
<p class="description"><?php esc_html_e( 'Disables or Enables Facebook Pixel ID’s for Variation', 'woo-feed' ); ?></p>
|
142 |
+
</td>
|
143 |
+
</tr>
|
144 |
+
<tr>
|
145 |
+
<th scope="row"><label for="pixel_id"><?php esc_html_e( 'Facebook Pixel Content ID’s for Variation', 'woo-feed' ); ?></label></th>
|
146 |
+
<td>
|
147 |
+
<input class="regular-text" type="number" name="pixel_id" id="pixel_id" value="<?php echo esc_attr( $settings['pixel_id'] ); ?>">
|
148 |
+
<p class="description"><?php esc_html_e( 'Insert your Facebook Pixel ID', 'woo-feed' ); ?></p>
|
149 |
+
</td>
|
150 |
+
</tr>
|
151 |
<tr>
|
152 |
<th scope="row"><label for="allow_all_shipping"><?php esc_html_e( 'Add shipping costs for all countries to feed (Google Shopping / Facebook only)', 'woo-feed' ); ?></label></th>
|
153 |
<td>
|
includes/class-woo-feed-docs.php
CHANGED
@@ -82,7 +82,7 @@ if ( ! class_exists( 'WooFeedDocs' ) ) {
|
|
82 |
'utm_source' => 'freePlugin',
|
83 |
'utm_medium' => 'free_plugin_doc',
|
84 |
'utm_campaign' => 'free_to_pro',
|
85 |
-
'utm_term'
|
86 |
), $qa->link );
|
87 |
|
88 |
?>
|
82 |
'utm_source' => 'freePlugin',
|
83 |
'utm_medium' => 'free_plugin_doc',
|
84 |
'utm_campaign' => 'free_to_pro',
|
85 |
+
'utm_term' => 'wooFeed',
|
86 |
), $qa->link );
|
87 |
|
88 |
?>
|
includes/classes/class-woo-feed-admin-message.php
CHANGED
@@ -94,10 +94,10 @@ final class Woo_Feed_Message {
|
|
94 |
private function display_support_links() {
|
95 |
$hide_promotion = (int) get_option('woo_feed_hide_promotion');
|
96 |
$utm_links = array(
|
97 |
-
'utm_source'
|
98 |
-
'utm_medium'
|
99 |
'utm_campaign' => 'free_to_pro',
|
100 |
-
'utm_term'
|
101 |
);
|
102 |
$doc_link = add_query_arg( $utm_links, 'https://webappick.com/docs/woo-feed/' );
|
103 |
$support_link = 'https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/';
|
94 |
private function display_support_links() {
|
95 |
$hide_promotion = (int) get_option('woo_feed_hide_promotion');
|
96 |
$utm_links = array(
|
97 |
+
'utm_source' => 'freePlugin',
|
98 |
+
'utm_medium' => 'free_plugin_doc',
|
99 |
'utm_campaign' => 'free_to_pro',
|
100 |
+
'utm_term' => 'wooFeed',
|
101 |
);
|
102 |
$doc_link = add_query_arg( $utm_links, 'https://webappick.com/docs/woo-feed/' );
|
103 |
$support_link = 'https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/';
|
includes/classes/class-woo-feed-default-attributes.php
CHANGED
@@ -754,10 +754,10 @@ class Woo_Feed_Default_Attributes {
|
|
754 |
public function google_dynamic_adsAttributes() {
|
755 |
|
756 |
return array(
|
757 |
-
'--1'
|
758 |
-
'Page URL'
|
759 |
-
'Custom Label'
|
760 |
-
'---1'
|
761 |
|
762 |
);
|
763 |
}
|
@@ -770,71 +770,71 @@ class Woo_Feed_Default_Attributes {
|
|
770 |
public function bingAttributes() {
|
771 |
|
772 |
return array(
|
773 |
-
'--1'
|
774 |
-
'id'
|
775 |
-
'title'
|
776 |
-
'link'
|
777 |
-
'price'
|
778 |
-
'description'
|
779 |
-
'image_link'
|
780 |
-
'shipping_country'
|
781 |
-
'shipping_service'
|
782 |
-
'shipping_price'
|
783 |
-
'gtin'
|
784 |
-
'mpn'
|
785 |
-
'brand'
|
786 |
-
'identifier_exists'
|
787 |
-
'---1'
|
788 |
-
'--2'
|
789 |
-
'gender'
|
790 |
-
'age_group'
|
791 |
-
'color'
|
792 |
-
'size'
|
793 |
-
'size_type'
|
794 |
-
'size_system'
|
795 |
-
'---2'
|
796 |
-
'--3'
|
797 |
-
'item_group_id'
|
798 |
-
'material'
|
799 |
-
'pattern'
|
800 |
-
'additional_image_link'
|
801 |
-
'---3'
|
802 |
-
'--4'
|
803 |
-
'adult'
|
804 |
-
'availability'
|
805 |
-
'product_category'
|
806 |
-
'condition'
|
807 |
-
'expiration_date'
|
808 |
-
'multipack'
|
809 |
-
'product_type'
|
810 |
-
'mobile_link'
|
811 |
-
'unit_pricing_measure'
|
812 |
-
'unit_pricing_base_measure'
|
813 |
-
'installment'
|
814 |
-
'energy_efficiency_class'
|
815 |
-
'min_energy_efficiency_class'
|
816 |
-
'max_energy_efficiency_class'
|
817 |
-
'seller_name'
|
818 |
-
'ads_redirect'
|
819 |
-
'custom_label_0'
|
820 |
-
'custom_label_1'
|
821 |
-
'custom_label_2'
|
822 |
-
'custom_label_3'
|
823 |
-
'custom_label_4'
|
824 |
-
'---4'
|
825 |
-
'--5'
|
826 |
-
'sale_price'
|
827 |
-
'sale_price_effective_date'
|
828 |
-
'promotion_ID'
|
829 |
-
'---5'
|
830 |
-
'--6'
|
831 |
-
'store_code'
|
832 |
-
'itemid'
|
833 |
-
'quantity'
|
834 |
-
'weeks_of_supply'
|
835 |
-
'pick_up_method'
|
836 |
-
'pick_up_sla'
|
837 |
-
'---6'
|
838 |
);
|
839 |
}
|
840 |
|
@@ -846,12 +846,12 @@ class Woo_Feed_Default_Attributes {
|
|
846 |
public function pinterest_rssAttributes() {
|
847 |
|
848 |
return array(
|
849 |
-
'--1'
|
850 |
-
'title'
|
851 |
-
'description'
|
852 |
-
'link'
|
853 |
-
'image'
|
854 |
-
'---1'
|
855 |
|
856 |
);
|
857 |
}
|
@@ -863,12 +863,12 @@ class Woo_Feed_Default_Attributes {
|
|
863 |
*/
|
864 |
public function googlereviewAttributes() {
|
865 |
return array(
|
866 |
-
'product_name'
|
867 |
-
'product_url'
|
868 |
-
'review_temp_gtin'
|
869 |
-
'review_temp_mpn'
|
870 |
-
'review_temp_sku'
|
871 |
-
'review_temp_brand'
|
872 |
);
|
873 |
}
|
874 |
|
@@ -879,19 +879,19 @@ class Woo_Feed_Default_Attributes {
|
|
879 |
*/
|
880 |
public function winesearcherAttributes() {
|
881 |
return array(
|
882 |
-
'--1'
|
883 |
-
'name'
|
884 |
-
'description'
|
885 |
-
'vintage'
|
886 |
-
'link'
|
887 |
-
'unit-size'
|
888 |
-
'price'
|
889 |
-
'url'
|
890 |
-
'min-order'
|
891 |
-
'tax'
|
892 |
-
'offer-type'
|
893 |
-
'delivery-time'
|
894 |
-
'stock-level'
|
895 |
);
|
896 |
}
|
897 |
|
@@ -941,34 +941,34 @@ class Woo_Feed_Default_Attributes {
|
|
941 |
*/
|
942 |
public function catchdotcomAttributes() {
|
943 |
return array(
|
944 |
-
'product-id'
|
945 |
-
'title'
|
946 |
-
'product-description'
|
947 |
-
'product-id-type'
|
948 |
-
'internal-sku'
|
949 |
-
'category'
|
950 |
-
'image-1'
|
951 |
-
'images-2'
|
952 |
-
'images-3'
|
953 |
-
'images-4'
|
954 |
-
'images-5'
|
955 |
-
'images-6'
|
956 |
-
'image-size-chart'
|
957 |
-
'brand'
|
958 |
-
'adult'
|
959 |
-
'keywords'
|
960 |
-
'sku'
|
961 |
-
'inventory'
|
962 |
-
'override'
|
963 |
-
'price'
|
964 |
-
'quantity'
|
965 |
-
'min-quantity-alert'
|
966 |
-
'state'
|
967 |
-
'logistic-class'
|
968 |
-
'discount-price'
|
969 |
-
'leadtime-to-ship'
|
970 |
-
'club-catch-eligible'
|
971 |
-
'tax-au'
|
972 |
);
|
973 |
}
|
974 |
|
@@ -979,26 +979,26 @@ class Woo_Feed_Default_Attributes {
|
|
979 |
*/
|
980 |
public function fashionchickAttributes() {
|
981 |
return array(
|
982 |
-
'Product ID'
|
983 |
-
'Titel'
|
984 |
-
'Omschrijving'
|
985 |
-
'Url'
|
986 |
-
'Image'
|
987 |
-
'Category'
|
988 |
-
'Prijs'
|
989 |
-
'Merk'
|
990 |
-
'Cluster ID'
|
991 |
-
'internal-sku'
|
992 |
-
'sku'
|
993 |
-
'Delivery Time'
|
994 |
-
'Shipping Costs'
|
995 |
-
'Old price'
|
996 |
-
'Product maten'
|
997 |
-
'Stock'
|
998 |
-
'Voorraad aantal'
|
999 |
-
'Materiaal'
|
1000 |
-
'Geslacht'
|
1001 |
-
'Kleur'
|
1002 |
);
|
1003 |
}
|
1004 |
|
754 |
public function google_dynamic_adsAttributes() {
|
755 |
|
756 |
return array(
|
757 |
+
'--1' => 'Basic Information',
|
758 |
+
'Page URL' => 'Page URL[Page URL]',
|
759 |
+
'Custom Label' => 'Custom Label [Custom Label]',
|
760 |
+
'---1' => '',
|
761 |
|
762 |
);
|
763 |
}
|
770 |
public function bingAttributes() {
|
771 |
|
772 |
return array(
|
773 |
+
'--1' => 'Basic Information',
|
774 |
+
'id' => 'Product Id[id]',
|
775 |
+
'title' => 'Product Title[title]',
|
776 |
+
'link' => 'Product Title[link]',
|
777 |
+
'price' => 'Product Price[price]',
|
778 |
+
'description' => 'Product Description[description]',
|
779 |
+
'image_link' => 'Image[image_link]',
|
780 |
+
'shipping_country' => 'Shipping Country[shipping]',
|
781 |
+
'shipping_service' => 'Shipping Service[shipping]',
|
782 |
+
'shipping_price' => 'Shipping Price[shipping]',
|
783 |
+
'gtin' => 'GTIN[gtin]',
|
784 |
+
'mpn' => 'MPN[mpn]',
|
785 |
+
'brand' => 'Brand[brand]',
|
786 |
+
'identifier_exists' => 'Identifier Exists[identifier_exists]',
|
787 |
+
'---1' => '',
|
788 |
+
'--2' => 'Apparel Products',
|
789 |
+
'gender' => 'Gender[gender]',
|
790 |
+
'age_group' => 'Age Group[age_group]',
|
791 |
+
'color' => 'Color[color]',
|
792 |
+
'size' => 'Size[size]',
|
793 |
+
'size_type' => 'Size Type[size_type]',
|
794 |
+
'size_system' => 'Size System[size_system]',
|
795 |
+
'---2' => '',
|
796 |
+
'--3' => 'Product Variants',
|
797 |
+
'item_group_id' => 'Item Group ID[item_group_id]',
|
798 |
+
'material' => 'Material[material]',
|
799 |
+
'pattern' => 'Pattern[pattern]',
|
800 |
+
'additional_image_link' => 'Additional Image Link[additional_image_link]',
|
801 |
+
'---3' => '',
|
802 |
+
'--4' => 'Other Information',
|
803 |
+
'adult' => 'Adult[adult]',
|
804 |
+
'availability' => 'Availability[availability]',
|
805 |
+
'product_category' => 'Product Category[product_category]',
|
806 |
+
'condition' => 'Condition[condition]',
|
807 |
+
'expiration_date' => 'Expiration Date[expiration_date]',
|
808 |
+
'multipack' => 'Multipack[multipack]',
|
809 |
+
'product_type' => 'Product Type[product_type]',
|
810 |
+
'mobile_link' => 'Mobile Link[mobile_link]',
|
811 |
+
'unit_pricing_measure' => 'Unit Pricing Measure[unit_pricing_measure]',
|
812 |
+
'unit_pricing_base_measure' => 'Unit Pricing Base Measure[unit_pricing_base_measure]',
|
813 |
+
'installment' => 'Installment[installment]',
|
814 |
+
'energy_efficiency_class' => 'Energy Efficiency Class[energy_efficiency_class]',
|
815 |
+
'min_energy_efficiency_class' => 'Min Energy Efficiency Class[min_energy_efficiency_class]',
|
816 |
+
'max_energy_efficiency_class' => 'Max Energy Efficiency Class[max_energy_efficiency_class]',
|
817 |
+
'seller_name' => 'Seller Name[seller_name]',
|
818 |
+
'ads_redirect' => 'Ads Redirect[ads_redirect]',
|
819 |
+
'custom_label_0' => 'Custom Label 0[custom_label_0]',
|
820 |
+
'custom_label_1' => 'Custom Label 1[custom_label_1]',
|
821 |
+
'custom_label_2' => 'Custom Label 2[custom_label_2]',
|
822 |
+
'custom_label_3' => 'Custom Label 3[custom_label_3]',
|
823 |
+
'custom_label_4' => 'Custom Label 4[custom_label_4]',
|
824 |
+
'---4' => '',
|
825 |
+
'--5' => 'Sales & Promotions',
|
826 |
+
'sale_price' => 'Sale Price[sale_price]',
|
827 |
+
'sale_price_effective_date' => 'Sale Price Effective Date[sale_price_effective_date]',
|
828 |
+
'promotion_ID' => 'Promotion ID[promotion_ID]',
|
829 |
+
'---5' => '',
|
830 |
+
'--6' => 'Local Product Inventory',
|
831 |
+
'store_code' => 'Store Code[store_code]',
|
832 |
+
'itemid' => 'Item ID[itemid]',
|
833 |
+
'quantity' => 'Quantity[quantity]',
|
834 |
+
'weeks_of_supply' => 'Weeks Of Supply[weeks_of_supply]',
|
835 |
+
'pick_up_method' => 'Pick Up Method[pick_up_method]',
|
836 |
+
'pick_up_sla' => 'Pick Up SLA[pick_up_sla]',
|
837 |
+
'---6' => '',
|
838 |
);
|
839 |
}
|
840 |
|
846 |
public function pinterest_rssAttributes() {
|
847 |
|
848 |
return array(
|
849 |
+
'--1' => 'Basic Information',
|
850 |
+
'title' => 'Product Title[title]',
|
851 |
+
'description' => 'Product Description[description]',
|
852 |
+
'link' => 'Product URL[link]',
|
853 |
+
'image' => 'Main Image[image]',
|
854 |
+
'---1' => '',
|
855 |
|
856 |
);
|
857 |
}
|
863 |
*/
|
864 |
public function googlereviewAttributes() {
|
865 |
return array(
|
866 |
+
'product_name' => 'Product Title [product_name]',
|
867 |
+
'product_url' => 'Product URL [product_url]',
|
868 |
+
'review_temp_gtin' => 'GTIN [gtin]',
|
869 |
+
'review_temp_mpn' => 'MPN [mpn]',
|
870 |
+
'review_temp_sku' => 'SKU [sku]',
|
871 |
+
'review_temp_brand' => 'Brand [brand]',
|
872 |
);
|
873 |
}
|
874 |
|
879 |
*/
|
880 |
public function winesearcherAttributes() {
|
881 |
return array(
|
882 |
+
'--1' => 'Basic Information',
|
883 |
+
'name' => 'Product Title[name]',
|
884 |
+
'description' => 'Product description[description]',
|
885 |
+
'vintage' => 'Vintage[vintage]',
|
886 |
+
'link' => 'Product URL[link]',
|
887 |
+
'unit-size' => 'Unit Size[unit-size]',
|
888 |
+
'price' => 'Price[price]',
|
889 |
+
'url' => 'URL[url] ',
|
890 |
+
'min-order' => 'Minimum Order[min-order]',
|
891 |
+
'tax' => 'Tax[tax]',
|
892 |
+
'offer-type' => 'Offer Type[offer-type]',
|
893 |
+
'delivery-time' => 'Delivery Time[delivery-time]',
|
894 |
+
'stock-level' => 'Stock Level[stock-level]',
|
895 |
);
|
896 |
}
|
897 |
|
941 |
*/
|
942 |
public function catchdotcomAttributes() {
|
943 |
return array(
|
944 |
+
'product-id' => 'Product ID [product-id]',
|
945 |
+
'title' => 'Product title [title]',
|
946 |
+
'product-description' => 'Product Description[product-description]',
|
947 |
+
'product-id-type' => 'Product ID Type[product-id-type]',
|
948 |
+
'internal-sku' => 'Internal SKU[internal-sku]',
|
949 |
+
'category' => 'Product Category[category]',
|
950 |
+
'image-1' => 'Image 1 [image-1]',
|
951 |
+
'images-2' => 'Image 2 [image-2]',
|
952 |
+
'images-3' => 'Image 3 [image-3]',
|
953 |
+
'images-4' => 'Image 4 [image-4]',
|
954 |
+
'images-5' => 'Image 5 [image-5]',
|
955 |
+
'images-6' => 'Image 6 [image-6]',
|
956 |
+
'image-size-chart' => 'Image Size Chart[image-size-chart]',
|
957 |
+
'brand' => 'Brand[brand]',
|
958 |
+
'adult' => 'Adult[adult]',
|
959 |
+
'keywords' => 'Keywords[keywords]',
|
960 |
+
'sku' => 'Offer SKU[sku]',
|
961 |
+
'inventory' => 'Facebook Inventory[inventory]',
|
962 |
+
'override' => 'Facebook Override[override]',
|
963 |
+
'price' => 'Regular Price[price]',
|
964 |
+
'quantity' => 'Offer Quantity[quantity]',
|
965 |
+
'min-quantity-alert' => 'Minimum Quantity Alert[min-quantity-alert]',
|
966 |
+
'state' => 'Offer State[state]',
|
967 |
+
'logistic-class' => 'Logistic Class[logistic-class]',
|
968 |
+
'discount-price' => 'Discount Price[discount-price]',
|
969 |
+
'leadtime-to-ship' => 'Lead Time to Ship[leadtime-to-ship]',
|
970 |
+
'club-catch-eligible' => 'Club Catch eligible[club-catch-eligible]',
|
971 |
+
'tax-au' => 'GST %[tax-au]',
|
972 |
);
|
973 |
}
|
974 |
|
979 |
*/
|
980 |
public function fashionchickAttributes() {
|
981 |
return array(
|
982 |
+
'Product ID' => 'Product ID [Product ID]',
|
983 |
+
'Titel' => 'Product Titel [Titel]',
|
984 |
+
'Omschrijving' => 'Product Description [Omschrijving]',
|
985 |
+
'Url' => 'Product URL [Url]',
|
986 |
+
'Image' => 'Image [Image]',
|
987 |
+
'Category' => 'Product Category [Category (pad)]',
|
988 |
+
'Prijs' => 'Regular Price [Prijs]',
|
989 |
+
'Merk' => 'Brand [Merk]',
|
990 |
+
'Cluster ID' => 'Cluster ID [Cluster ID]',
|
991 |
+
'internal-sku' => 'Internal SKU [internal-sku]',
|
992 |
+
'sku' => 'Offer SKU[sku]',
|
993 |
+
'Delivery Time' => 'Delivery Time [Delivery Time]',
|
994 |
+
'Shipping Costs' => 'Shipping Costs [Shipping Costs]',
|
995 |
+
'Old price' => 'Old price [Old price]',
|
996 |
+
'Product maten' => 'Product sizes [Product maten]',
|
997 |
+
'Stock' => 'Stock [Stock]',
|
998 |
+
'Voorraad aantal' => 'Stock quantity [Voorraad aantal]',
|
999 |
+
'Materiaal' => 'Material [Materiaal]',
|
1000 |
+
'Geslacht' => 'Gender [Geslacht]',
|
1001 |
+
'Kleur' => 'Color [Kleur]',
|
1002 |
);
|
1003 |
}
|
1004 |
|
includes/classes/class-woo-feed-dropdown.php
CHANGED
@@ -315,7 +315,7 @@ class Woo_Feed_Dropdown {
|
|
315 |
if ( in_array( 'title', array_keys($attributes) ) ) {
|
316 |
$search_key = 'title';
|
317 |
$aioseop_title = [
|
318 |
-
'_aioseop_title'
|
319 |
];
|
320 |
|
321 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $aioseop_title );
|
@@ -336,7 +336,7 @@ class Woo_Feed_Dropdown {
|
|
336 |
//add yoast title array in the dropdown
|
337 |
$search_key = in_array( '_aioseop_title', array_keys($attributes) ) ? '_aioseop_title' : 'title';
|
338 |
$yoast_title = [
|
339 |
-
'yoast_wpseo_title'
|
340 |
];
|
341 |
|
342 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $yoast_title );
|
@@ -361,7 +361,7 @@ class Woo_Feed_Dropdown {
|
|
361 |
$search_key = 'title';
|
362 |
}
|
363 |
$rankmath_title = [
|
364 |
-
'rank_math_title'
|
365 |
];
|
366 |
|
367 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_title );
|
@@ -375,7 +375,7 @@ class Woo_Feed_Dropdown {
|
|
375 |
$search_key = 'description';
|
376 |
}
|
377 |
$rankmath_description = [
|
378 |
-
'rank_math_description'
|
379 |
];
|
380 |
|
381 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_description );
|
@@ -384,7 +384,7 @@ class Woo_Feed_Dropdown {
|
|
384 |
if ( in_array( 'canonical_link', array_keys($attributes) ) ) {
|
385 |
$search_key = 'canonical_link';
|
386 |
$rankmath_canonical_link = [
|
387 |
-
'rank_math_canonical_url'
|
388 |
];
|
389 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_canonical_link );
|
390 |
}
|
315 |
if ( in_array( 'title', array_keys($attributes) ) ) {
|
316 |
$search_key = 'title';
|
317 |
$aioseop_title = [
|
318 |
+
'_aioseop_title' => esc_html__( 'Title [All in One SEO]', 'woo-feed' ),
|
319 |
];
|
320 |
|
321 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $aioseop_title );
|
336 |
//add yoast title array in the dropdown
|
337 |
$search_key = in_array( '_aioseop_title', array_keys($attributes) ) ? '_aioseop_title' : 'title';
|
338 |
$yoast_title = [
|
339 |
+
'yoast_wpseo_title' => esc_html__( 'Title [Yoast SEO]', 'woo-feed' ),
|
340 |
];
|
341 |
|
342 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $yoast_title );
|
361 |
$search_key = 'title';
|
362 |
}
|
363 |
$rankmath_title = [
|
364 |
+
'rank_math_title' => esc_html__( 'Title [Rank Math SEO]', 'woo-feed' ),
|
365 |
];
|
366 |
|
367 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_title );
|
375 |
$search_key = 'description';
|
376 |
}
|
377 |
$rankmath_description = [
|
378 |
+
'rank_math_description' => esc_html__( 'Description [Rank Math SEO]', 'woo-feed' ),
|
379 |
];
|
380 |
|
381 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_description );
|
384 |
if ( in_array( 'canonical_link', array_keys($attributes) ) ) {
|
385 |
$search_key = 'canonical_link';
|
386 |
$rankmath_canonical_link = [
|
387 |
+
'rank_math_canonical_url' => esc_html__( 'Rank Math Canonical URL [Rank Math SEO]', 'woo-feed' ),
|
388 |
];
|
389 |
$attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_canonical_link );
|
390 |
}
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -152,7 +152,7 @@ class Woo_Feed_Products_v3
|
|
152 |
* @var array
|
153 |
*/
|
154 |
protected $skipped_merchant_attributes = array(
|
155 |
-
'google'
|
156 |
'shipping_country',
|
157 |
'shipping_region',
|
158 |
'shipping_postal_code',
|
@@ -171,7 +171,7 @@ class Woo_Feed_Products_v3
|
|
171 |
'attribute_name',
|
172 |
'attribute_value',
|
173 |
),
|
174 |
-
'facebook'
|
175 |
'shipping_country',
|
176 |
'shipping_region',
|
177 |
'shipping_service',
|
@@ -189,7 +189,7 @@ class Woo_Feed_Products_v3
|
|
189 |
'attribute_name',
|
190 |
'attribute_value',
|
191 |
),
|
192 |
-
'bing'
|
193 |
'shipping_country',
|
194 |
'shipping_service',
|
195 |
'shipping_price',
|
@@ -875,7 +875,7 @@ class Woo_Feed_Products_v3
|
|
875 |
}
|
876 |
if ( 'shipping_region' == $value ) {
|
877 |
$shipping .= ':'.$output;
|
878 |
-
}
|
879 |
$shipping .= ':'.$output;
|
880 |
}
|
881 |
if ( 'shipping_service' == $value ) {
|
152 |
* @var array
|
153 |
*/
|
154 |
protected $skipped_merchant_attributes = array(
|
155 |
+
'google' => array(
|
156 |
'shipping_country',
|
157 |
'shipping_region',
|
158 |
'shipping_postal_code',
|
171 |
'attribute_name',
|
172 |
'attribute_value',
|
173 |
),
|
174 |
+
'facebook' => array(
|
175 |
'shipping_country',
|
176 |
'shipping_region',
|
177 |
'shipping_service',
|
189 |
'attribute_name',
|
190 |
'attribute_value',
|
191 |
),
|
192 |
+
'bing' => array(
|
193 |
'shipping_country',
|
194 |
'shipping_service',
|
195 |
'shipping_price',
|
875 |
}
|
876 |
if ( 'shipping_region' == $value ) {
|
877 |
$shipping .= ':'.$output;
|
878 |
+
}elseif ( 'shipping_postal_code' == $value ) {
|
879 |
$shipping .= ':'.$output;
|
880 |
}
|
881 |
if ( 'shipping_service' == $value ) {
|
includes/classes/class-woo-feed-webappick-api.php
CHANGED
@@ -301,14 +301,14 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
|
|
301 |
$next_timestamp = get_option('woo_feed_review_notice_next_show_time');
|
302 |
$review_notice_dismissed = get_user_meta( $user_id, 'woo_feed_review_notice_dismissed', true );
|
303 |
|
304 |
-
if( ! empty($next_timestamp) ) {
|
305 |
-
if( ( time() > $next_timestamp ) ) {
|
306 |
$show_notice = true;
|
307 |
}else {
|
308 |
$show_notice = false;
|
309 |
}
|
310 |
} else {
|
311 |
-
if( isset($review_notice_dismissed) && !empty($review_notice_dismissed) ) {
|
312 |
$show_notice = false;
|
313 |
}else {
|
314 |
$show_notice = true;
|
@@ -413,10 +413,10 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
|
|
413 |
'updated_at' => time(),
|
414 |
];
|
415 |
|
416 |
-
if( 'never' === $_POST['notice'] || 'done' === $_POST['notice'] ) {
|
417 |
$user_id = get_current_user_id();
|
418 |
add_user_meta( $user_id, 'woo_feed_review_notice_dismissed', true, true );
|
419 |
-
}elseif( 'given' !== $_POST['notice'] ) {
|
420 |
update_option( 'woo_feed_review_notice_next_show_time', time() + ( DAY_IN_SECONDS * 30 ) );
|
421 |
}
|
422 |
|
301 |
$next_timestamp = get_option('woo_feed_review_notice_next_show_time');
|
302 |
$review_notice_dismissed = get_user_meta( $user_id, 'woo_feed_review_notice_dismissed', true );
|
303 |
|
304 |
+
if ( ! empty($next_timestamp) ) {
|
305 |
+
if ( ( time() > $next_timestamp ) ) {
|
306 |
$show_notice = true;
|
307 |
}else {
|
308 |
$show_notice = false;
|
309 |
}
|
310 |
} else {
|
311 |
+
if ( isset($review_notice_dismissed) && ! empty($review_notice_dismissed) ) {
|
312 |
$show_notice = false;
|
313 |
}else {
|
314 |
$show_notice = true;
|
413 |
'updated_at' => time(),
|
414 |
];
|
415 |
|
416 |
+
if ( 'never' === $_POST['notice'] || 'done' === $_POST['notice'] ) {
|
417 |
$user_id = get_current_user_id();
|
418 |
add_user_meta( $user_id, 'woo_feed_review_notice_dismissed', true, true );
|
419 |
+
}elseif ( 'given' !== $_POST['notice'] ) {
|
420 |
update_option( 'woo_feed_review_notice_next_show_time', time() + ( DAY_IN_SECONDS * 30 ) );
|
421 |
}
|
422 |
|
includes/helper.php
CHANGED
@@ -918,11 +918,11 @@ if ( ! function_exists( 'woo_feed_get_csv_delimiters' ) ) {
|
|
918 |
*/
|
919 |
function woo_feed_get_csv_delimiters() {
|
920 |
return [
|
921 |
-
','
|
922 |
-
':'
|
923 |
-
' '
|
924 |
-
'|'
|
925 |
-
';'
|
926 |
];
|
927 |
}
|
928 |
}
|
@@ -2176,18 +2176,18 @@ if ( ! function_exists( 'woo_feed_get_options' ) ) {
|
|
2176 |
*/
|
2177 |
function woo_feed_get_options( $key, $default = false ) {
|
2178 |
$defaults = [
|
2179 |
-
'per_batch'
|
2180 |
-
'product_query_type'
|
2181 |
-
'enable_error_debugging'
|
2182 |
-
'cache_ttl'
|
2183 |
-
'overridden_structured_data'
|
2184 |
-
'disable_mpn'
|
2185 |
-
'disable_brand'
|
2186 |
-
|
2187 |
-
'pixel_id' => ''
|
2188 |
-
'allow_all_shipping'
|
2189 |
-
'only_free_shipping'
|
2190 |
-
'only_local_pickup_shipping'
|
2191 |
];
|
2192 |
|
2193 |
/**
|
@@ -2277,20 +2277,21 @@ if ( ! function_exists( 'woo_feed_save_options' ) ) {
|
|
2277 |
}
|
2278 |
unset( $args['disable_brand'] );
|
2279 |
}
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
|
|
2294 |
if ( array_key_exists( 'allow_all_shipping', $args ) ) {
|
2295 |
$data['allow_all_shipping'] = strtolower( $args['allow_all_shipping'] );
|
2296 |
if ( ! in_array( $data['allow_all_shipping'], array( 'yes', 'no' ) ) ) {
|
@@ -3039,10 +3040,10 @@ if ( ! function_exists( 'woo_feed_get_approved_reviews_data' ) ) {
|
|
3039 |
|
3040 |
foreach ( $product_ids as $product_id ) {
|
3041 |
$reviews = get_comments(array(
|
3042 |
-
'post_id'
|
3043 |
-
'comment_type'
|
3044 |
-
'comment_approved'
|
3045 |
-
'parent'
|
3046 |
));
|
3047 |
|
3048 |
$product_name = get_the_title( $product_id );
|
@@ -3184,14 +3185,14 @@ if ( ! function_exists( 'woo_feed_brand_taxonomy' ) ) {
|
|
3184 |
'choose_from_most_used' => 'Choose from the most used Brands',
|
3185 |
);
|
3186 |
$args = array(
|
3187 |
-
'labels'
|
3188 |
-
'hierarchical'
|
3189 |
-
'public'
|
3190 |
-
'show_ui'
|
3191 |
-
'show_admin_column'
|
3192 |
-
'show_in_rest'
|
3193 |
-
'show_in_nav_menus'
|
3194 |
-
'show_tagcloud'
|
3195 |
);
|
3196 |
register_taxonomy( 'woo-feed-brand', 'product', $args );
|
3197 |
}
|
@@ -3318,8 +3319,8 @@ if ( ! function_exists( 'woo_feed_product_structured_data' ) ) {
|
|
3318 |
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
3319 |
'priceValidUntil' => $price_valid_until,
|
3320 |
'priceSpecification' => array(
|
3321 |
-
'price'
|
3322 |
-
'priceCurrency'
|
3323 |
'valueAddedTaxIncluded' => wc_prices_include_tax() ? 'true' : 'false',
|
3324 |
),
|
3325 |
);
|
@@ -3440,26 +3441,25 @@ if ( ! function_exists( 'woo_feed_trim_attribute' ) ) {
|
|
3440 |
}
|
3441 |
}
|
3442 |
|
|
|
|
|
|
|
|
|
|
|
3443 |
|
3444 |
-
|
3445 |
-
/**
|
3446 |
-
* Woo Feed Pixel Support
|
3447 |
-
*/
|
3448 |
-
function woo_feed_pixel_script(){
|
3449 |
-
|
3450 |
-
global $woocommerce, $post;
|
3451 |
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
|
3457 |
-
|
3458 |
-
|
3459 |
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
if ( $product instanceof WC_Product ) {
|
3464 |
$product_price = $product->get_price();
|
3465 |
$view_type .= "fbq('track', 'ViewContent', {
|
@@ -3470,16 +3470,16 @@ if ( ! function_exists( 'woo_feed_pixel_script' ) ) {
|
|
3470 |
currency: '" . get_option('woocommerce_currency') . "'
|
3471 |
});";
|
3472 |
}
|
3473 |
-
|
3474 |
|
3475 |
-
|
3476 |
-
|
3477 |
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
3482 |
-
|
3483 |
$price = $order->get_total();
|
3484 |
$currency = $order->get_currency();
|
3485 |
$view_type .= "fbq('track', 'Purchase', {
|
@@ -3491,11 +3491,11 @@ if ( ! function_exists( 'woo_feed_pixel_script' ) ) {
|
|
3491 |
currency: '$currency'
|
3492 |
})";
|
3493 |
}
|
3494 |
-
|
3495 |
-
|
3496 |
|
3497 |
-
|
3498 |
-
|
3499 |
<!-- Facebook Pixel Code -->
|
3500 |
<script>
|
3501 |
!function(f,b,e,v,n,t,s)
|
@@ -3507,51 +3507,98 @@ if ( ! function_exists( 'woo_feed_pixel_script' ) ) {
|
|
3507 |
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
3508 |
'https://connect.facebook.net/en_US/fbevents.js');
|
3509 |
fbq('init', '<?php echo $pixel_id; ?>');
|
3510 |
-
|
3511 |
</script>
|
3512 |
<!-- End Facebook Pixel Code -->
|
3513 |
-
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
}
|
3518 |
|
3519 |
-
|
3520 |
-
|
3521 |
-
|
3522 |
-
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
3526 |
-
|
3527 |
-
|
3528 |
-
|
3529 |
-
|
3530 |
-
|
3531 |
-
|
3532 |
-
|
3533 |
-
|
3534 |
-
|
|
|
|
|
|
|
3535 |
$product_name = $product->get_title();
|
3536 |
$product_id = $product->get_id();
|
3537 |
$product_price = $product->get_price();
|
3538 |
-
$currency = get_option(
|
3539 |
|
3540 |
$view_type = "<script>
|
3541 |
-
fbq('track', 'AddToCart', {
|
3542 |
-
content_name: '$product_name',
|
3543 |
-
content_ids: $product_id,
|
3544 |
-
content_type: 'product',
|
3545 |
value: $product_price,
|
3546 |
currency: '$currency',});
|
3547 |
</script>";
|
3548 |
|
3549 |
echo $view_type;
|
3550 |
}
|
3551 |
-
|
3552 |
-
|
3553 |
-
|
3554 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3555 |
}
|
3556 |
|
3557 |
if ( ! function_exists( 'woo_feed_filter_dropdown_attributes' ) ) {
|
918 |
*/
|
919 |
function woo_feed_get_csv_delimiters() {
|
920 |
return [
|
921 |
+
',' => 'Comma',
|
922 |
+
':' => 'Colon',
|
923 |
+
' ' => 'Space',
|
924 |
+
'|' => 'Pipe',
|
925 |
+
';' => 'Semi Colon',
|
926 |
];
|
927 |
}
|
928 |
}
|
2176 |
*/
|
2177 |
function woo_feed_get_options( $key, $default = false ) {
|
2178 |
$defaults = [
|
2179 |
+
'per_batch' => 200,
|
2180 |
+
'product_query_type' => 'wc',
|
2181 |
+
'enable_error_debugging' => 'off',
|
2182 |
+
'cache_ttl' => 6 * HOUR_IN_SECONDS,
|
2183 |
+
'overridden_structured_data' => 'on',
|
2184 |
+
'disable_mpn' => 'enable',
|
2185 |
+
'disable_brand' => 'enable',
|
2186 |
+
'disable_pixel' => 'enable',
|
2187 |
+
'pixel_id' => '',
|
2188 |
+
'allow_all_shipping' => 'no',
|
2189 |
+
'only_free_shipping' => 'yes',
|
2190 |
+
'only_local_pickup_shipping' => 'no',
|
2191 |
];
|
2192 |
|
2193 |
/**
|
2277 |
}
|
2278 |
unset( $args['disable_brand'] );
|
2279 |
}
|
2280 |
+
if ( array_key_exists( 'disable_pixel', $args ) ) {
|
2281 |
+
$data['disable_pixel'] = strtolower( $args['disable_pixel'] );
|
2282 |
+
if ( ! in_array( $data['disable_pixel'], array( 'enable', 'disable' ) ) ) {
|
2283 |
+
$data['disable_pixel'] = in_array( $_data['disable_pixel'], array( 'enable', 'disable' ) ) ? $_data['disable_pixel'] : $defaults['disable_pixel'];
|
2284 |
+
}
|
2285 |
+
unset( $args['disable_pixel'] );
|
2286 |
+
}
|
2287 |
+
if ( array_key_exists( 'pixel_id', $args ) ) {
|
2288 |
+
if( isset($args['pixel_id']) && !empty($args['pixel_id']) ) {
|
2289 |
+
$data['pixel_id'] = absint( $args['pixel_id'] );
|
2290 |
+
}else {
|
2291 |
+
$data['pixel_id'] = $defaults['pixel_id'];
|
2292 |
+
}
|
2293 |
+
unset( $args['pixel_id'] );
|
2294 |
+
}
|
2295 |
if ( array_key_exists( 'allow_all_shipping', $args ) ) {
|
2296 |
$data['allow_all_shipping'] = strtolower( $args['allow_all_shipping'] );
|
2297 |
if ( ! in_array( $data['allow_all_shipping'], array( 'yes', 'no' ) ) ) {
|
3040 |
|
3041 |
foreach ( $product_ids as $product_id ) {
|
3042 |
$reviews = get_comments(array(
|
3043 |
+
'post_id' => $product_id,
|
3044 |
+
'comment_type' => 'review',
|
3045 |
+
'comment_approved' => 1,
|
3046 |
+
'parent' => 0,
|
3047 |
));
|
3048 |
|
3049 |
$product_name = get_the_title( $product_id );
|
3185 |
'choose_from_most_used' => 'Choose from the most used Brands',
|
3186 |
);
|
3187 |
$args = array(
|
3188 |
+
'labels' => $labels,
|
3189 |
+
'hierarchical' => true,
|
3190 |
+
'public' => true,
|
3191 |
+
'show_ui' => true,
|
3192 |
+
'show_admin_column' => false,
|
3193 |
+
'show_in_rest' => true,
|
3194 |
+
'show_in_nav_menus' => true,
|
3195 |
+
'show_tagcloud' => true,
|
3196 |
);
|
3197 |
register_taxonomy( 'woo-feed-brand', 'product', $args );
|
3198 |
}
|
3319 |
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
3320 |
'priceValidUntil' => $price_valid_until,
|
3321 |
'priceSpecification' => array(
|
3322 |
+
'price' => wc_format_decimal( $lowest, wc_get_price_decimals() ),
|
3323 |
+
'priceCurrency' => $currency,
|
3324 |
'valueAddedTaxIncluded' => wc_prices_include_tax() ? 'true' : 'false',
|
3325 |
),
|
3326 |
);
|
3441 |
}
|
3442 |
}
|
3443 |
|
3444 |
+
if ( ! function_exists('woo_feed_pixel_script') ) {
|
3445 |
+
/**
|
3446 |
+
* Woo Feed Pixel Support
|
3447 |
+
*/
|
3448 |
+
function woo_feed_pixel_script() {
|
3449 |
|
3450 |
+
global $woocommerce, $post;
|
|
|
|
|
|
|
|
|
|
|
|
|
3451 |
|
3452 |
+
// Pixel Config.
|
3453 |
+
$settings = woo_feed_get_options('all');
|
3454 |
+
$disable_pixel = $settings['disable_pixel'];
|
3455 |
+
$pixel_id = $settings['pixel_id'];
|
3456 |
|
3457 |
+
// Page View Tracking
|
3458 |
+
$view_type = "fbq('track', 'PageView');";
|
3459 |
|
3460 |
+
// Product Tracking
|
3461 |
+
if ( is_product() ) {
|
3462 |
+
$product = wc_get_product($post->ID);
|
3463 |
if ( $product instanceof WC_Product ) {
|
3464 |
$product_price = $product->get_price();
|
3465 |
$view_type .= "fbq('track', 'ViewContent', {
|
3470 |
currency: '" . get_option('woocommerce_currency') . "'
|
3471 |
});";
|
3472 |
}
|
3473 |
+
}
|
3474 |
|
3475 |
+
// Purchase Tracking
|
3476 |
+
if ( is_wc_endpoint_url('order-received') ) {
|
3477 |
|
3478 |
+
$product_skus = '';
|
3479 |
+
global $wp_query;
|
3480 |
+
if ( ! empty($wp_query->query_vars['order-received']) ) {
|
3481 |
+
$order = wc_get_order($wp_query->query_vars['order-received']);
|
3482 |
+
if ( $order instanceof WC_Order ) {
|
3483 |
$price = $order->get_total();
|
3484 |
$currency = $order->get_currency();
|
3485 |
$view_type .= "fbq('track', 'Purchase', {
|
3491 |
currency: '$currency'
|
3492 |
})";
|
3493 |
}
|
3494 |
+
}
|
3495 |
+
}
|
3496 |
|
3497 |
+
if ( 'enable' == $disable_pixel && ! empty( $pixel_id ) ) {
|
3498 |
+
?>
|
3499 |
<!-- Facebook Pixel Code -->
|
3500 |
<script>
|
3501 |
!function(f,b,e,v,n,t,s)
|
3507 |
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
3508 |
'https://connect.facebook.net/en_US/fbevents.js');
|
3509 |
fbq('init', '<?php echo $pixel_id; ?>');
|
3510 |
+
<?php echo $view_type; ?>
|
3511 |
</script>
|
3512 |
<!-- End Facebook Pixel Code -->
|
3513 |
+
<?php
|
3514 |
+
}
|
3515 |
+
}
|
3516 |
+
add_action('wp_head', 'woo_feed_pixel_script');
|
3517 |
}
|
3518 |
|
3519 |
+
|
3520 |
+
|
3521 |
+
if ( ! function_exists('woo_feed_addtocart') ) {
|
3522 |
+
/**
|
3523 |
+
* Woo Feed Add to Cart
|
3524 |
+
*/
|
3525 |
+
function woo_feed_addtocart() {
|
3526 |
+
// Add to Cart Config
|
3527 |
+
$settings = woo_feed_get_options('all');
|
3528 |
+
$disable_pixel = $settings['disable_pixel'];
|
3529 |
+
$pixel_id = $settings['pixel_id'];
|
3530 |
+
|
3531 |
+
// Add to Cart Tracking
|
3532 |
+
if ( 'enable' == $disable_pixel && ! empty( $pixel_id ) ) {
|
3533 |
+
|
3534 |
+
if ( isset($_POST['add-to-cart']) ) {
|
3535 |
+
$product_id = ! empty($_POST['add-to-cart']) ? $_POST['add-to-cart'] : "";
|
3536 |
+
$product = wc_get_product( (int)$product_id);
|
3537 |
+
if ( $product instanceof WC_Product ) {
|
3538 |
$product_name = $product->get_title();
|
3539 |
$product_id = $product->get_id();
|
3540 |
$product_price = $product->get_price();
|
3541 |
+
$currency = get_option('woocommerce_currency');
|
3542 |
|
3543 |
$view_type = "<script>
|
3544 |
+
fbq('track', 'AddToCart', {
|
3545 |
+
content_name: '$product_name',
|
3546 |
+
content_ids: $product_id,
|
3547 |
+
content_type: 'product',
|
3548 |
value: $product_price,
|
3549 |
currency: '$currency',});
|
3550 |
</script>";
|
3551 |
|
3552 |
echo $view_type;
|
3553 |
}
|
3554 |
+
}
|
3555 |
+
|
3556 |
+
?>
|
3557 |
+
<script>
|
3558 |
+
let woo_feed_ajax_url = '<?php echo admin_url('admin-ajax.php'); ?>';
|
3559 |
+
|
3560 |
+
//product page add to cart
|
3561 |
+
jQuery(document).on("click", ".add_to_cart_button", function(event) {
|
3562 |
+
event.preventDefault();
|
3563 |
+
let product_id = jQuery(this).data('product_id');
|
3564 |
+
woo_feed_add_to_cart_pixel(product_id);
|
3565 |
+
});
|
3566 |
+
|
3567 |
+
//single page add to cart
|
3568 |
+
jQuery(document).on("click", ".single_add_to_cart_button", function(event) {
|
3569 |
+
let product_id = jQuery(this).attr('value');
|
3570 |
+
woo_feed_add_to_cart_pixel(product_id);
|
3571 |
+
|
3572 |
+
});
|
3573 |
+
|
3574 |
+
//add product data to facebook pixel during add to cart
|
3575 |
+
function woo_feed_ajax_add_to_cart_pixel(product_id) {
|
3576 |
+
if( product_id ) {
|
3577 |
+
let data = {
|
3578 |
+
action: 'add_to_cart_pixel',
|
3579 |
+
product_id: product_id
|
3580 |
+
};
|
3581 |
+
|
3582 |
+
jQuery.post(woo_feed_ajax_url, data, function(response) {
|
3583 |
+
if( !jQuery.isEmptyObject(response) ) {
|
3584 |
+
fbq('track', 'AddToCart', {
|
3585 |
+
content_name: response.name,
|
3586 |
+
content_ids: response.id,
|
3587 |
+
content_type: 'product',
|
3588 |
+
value: response.price,
|
3589 |
+
currency: response.currency,
|
3590 |
+
});
|
3591 |
+
}
|
3592 |
+
|
3593 |
+
}, 'json');
|
3594 |
+
}
|
3595 |
+
}
|
3596 |
+
|
3597 |
+
</script>
|
3598 |
+
<?php
|
3599 |
+
}
|
3600 |
+
}
|
3601 |
+
add_action('wp_head', 'woo_feed_addtocart');
|
3602 |
}
|
3603 |
|
3604 |
if ( ! function_exists( 'woo_feed_filter_dropdown_attributes' ) ) {
|
woo-feed.php
CHANGED
@@ -10,7 +10,7 @@
|
|
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.
|
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' ) ) {
|
@@ -850,18 +850,18 @@ if ( ! function_exists( 'woo_feed_config_feed' ) ) {
|
|
850 |
check_admin_referer( 'woo-feed-config' );
|
851 |
|
852 |
$data = [
|
853 |
-
'per_batch'
|
854 |
-
'product_query_type'
|
855 |
-
'enable_error_debugging'
|
856 |
-
'cache_ttl'
|
857 |
-
'overridden_structured_data'
|
858 |
-
'disable_mpn'
|
859 |
-
'disable_brand'
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
'only_free_shipping'
|
864 |
-
'only_local_pickup_shipping'
|
865 |
];
|
866 |
|
867 |
woo_feed_save_options( $data );
|
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.46
|
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.46' );
|
42 |
}
|
43 |
|
44 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
850 |
check_admin_referer( 'woo-feed-config' );
|
851 |
|
852 |
$data = [
|
853 |
+
'per_batch' => isset( $_POST['batch_limit'] ) ? absint( $_POST['batch_limit'] ) : '',
|
854 |
+
'product_query_type' => isset( $_POST['product_query_type'] ) ? sanitize_text_field( wp_unslash( $_POST['product_query_type'] ) ) : '',
|
855 |
+
'enable_error_debugging' => isset( $_POST['enable_error_debugging'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_error_debugging'] ) ) : '',
|
856 |
+
'cache_ttl' => isset( $_POST['cache_ttl'] ) ? absint( $_POST['cache_ttl'] ) : '',
|
857 |
+
'overridden_structured_data' => isset( $_POST['overridden_structured_data'] ) ? sanitize_text_field( wp_unslash($_POST['overridden_structured_data']) ) : '',
|
858 |
+
'disable_mpn' => isset( $_POST['disable_mpn'] ) ? sanitize_text_field( wp_unslash($_POST['disable_mpn']) ) : '',
|
859 |
+
'disable_brand' => isset( $_POST['disable_brand'] ) ? sanitize_text_field( wp_unslash($_POST['disable_brand']) ) : '',
|
860 |
+
'disable_pixel' => isset( $_POST['disable_pixel'] ) ? sanitize_text_field( $_POST['disable_pixel'] ) : '',
|
861 |
+
'pixel_id' => isset( $_POST['pixel_id'] ) ? sanitize_text_field( $_POST['pixel_id'] ) : '',
|
862 |
+
'allow_all_shipping' => isset( $_POST['allow_all_shipping'] ) ? sanitize_text_field( wp_unslash($_POST['allow_all_shipping']) ) : '',
|
863 |
+
'only_free_shipping' => isset( $_POST['only_free_shipping'] ) ? sanitize_text_field( wp_unslash($_POST['only_free_shipping']) ) : '',
|
864 |
+
'only_local_pickup_shipping' => isset( $_POST['only_local_pickup_shipping'] ) ? sanitize_text_field( wp_unslash($_POST['only_local_pickup_shipping']) ) : '',
|
865 |
];
|
866 |
|
867 |
woo_feed_save_options( $data );
|