update
This commit is contained in:
@@ -80,9 +80,10 @@ class WooSEA_fruugoaus {
|
||||
"format" => "optional",
|
||||
),
|
||||
"VAT Rate" => array(
|
||||
"name" => "VatRate",
|
||||
"feed_name" => "VatRate",
|
||||
"name" => "VATRate",
|
||||
"feed_name" => "VATRate",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "vat",
|
||||
),
|
||||
"Image URL 2" => array(
|
||||
"name" => "Imageurl2",
|
||||
|
||||
@@ -69,20 +69,21 @@ class WooSEA_fruugoes {
|
||||
"woo_suggest" => "description",
|
||||
),
|
||||
"Normal Price With VAT" => array(
|
||||
"name" => "NormalPriceWithVat",
|
||||
"feed_name" => "NormalPriceWithVat",
|
||||
"name" => "NormalPriceWithVAT",
|
||||
"feed_name" => "NormalPriceWithVAT",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "price",
|
||||
),
|
||||
"Normal Price Without VAT" => array(
|
||||
"name" => "NormalPriceWithoutVat",
|
||||
"feed_name" => "NormalPriceWithoutVat",
|
||||
"name" => "NormalPriceWithoutVAT",
|
||||
"feed_name" => "NormalPriceWithoutVAT",
|
||||
"format" => "optional",
|
||||
),
|
||||
"VAT Rate" => array(
|
||||
"name" => "VatRate",
|
||||
"feed_name" => "VatRate",
|
||||
"name" => "VATRate",
|
||||
"feed_name" => "VATRate",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "vat",
|
||||
),
|
||||
"Image URL 2" => array(
|
||||
"name" => "Imageurl2",
|
||||
|
||||
@@ -83,6 +83,7 @@ class WooSEA_fruugonl {
|
||||
"name" => "VATRate",
|
||||
"feed_name" => "VATRate",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "vat",
|
||||
),
|
||||
"Image URL 2" => array(
|
||||
"name" => "Imageurl2",
|
||||
|
||||
@@ -69,21 +69,22 @@ class WooSEA_fruugouk {
|
||||
"woo_suggest" => "description",
|
||||
),
|
||||
"Normal Price Without VAT" => array(
|
||||
"name" => "NormalPriceWithoutVat",
|
||||
"feed_name" => "NormalPriceWithoutVat",
|
||||
"name" => "NormalPriceWithoutVAT",
|
||||
"feed_name" => "NormalPriceWithoutVAT",
|
||||
"format" => "optional",
|
||||
),
|
||||
|
||||
"Normal Price With VAT" => array(
|
||||
"name" => "NormalPriceWithVat",
|
||||
"feed_name" => "NormalPriceWithVat",
|
||||
"name" => "NormalPriceWithVAT",
|
||||
"feed_name" => "NormalPriceWithVAT",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "price",
|
||||
),
|
||||
"VAT Rate" => array(
|
||||
"name" => "VatRate",
|
||||
"feed_name" => "VatRate",
|
||||
"name" => "VATRate",
|
||||
"feed_name" => "VATRate",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "vat",
|
||||
),
|
||||
"Image URL 2" => array(
|
||||
"name" => "Imageurl2",
|
||||
|
||||
@@ -69,20 +69,21 @@ class WooSEA_fruugous {
|
||||
"woo_suggest" => "description",
|
||||
),
|
||||
"Normal Price With VAT" => array(
|
||||
"name" => "NormalPriceWithVat",
|
||||
"feed_name" => "NormalPriceWithVat",
|
||||
"name" => "NormalPriceWithVAT",
|
||||
"feed_name" => "NormalPriceWithVAT",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "price",
|
||||
),
|
||||
"Normal Price Without VAT" => array(
|
||||
"name" => "NormalPriceWithoutVat",
|
||||
"feed_name" => "NormalPriceWithoutVat",
|
||||
"name" => "NormalPriceWithoutVAT",
|
||||
"feed_name" => "NormalPriceWithoutVAT",
|
||||
"format" => "optional",
|
||||
),
|
||||
"VAT Rate" => array(
|
||||
"name" => "VatRate",
|
||||
"feed_name" => "VatRate",
|
||||
"name" => "VATRate",
|
||||
"feed_name" => "VATRate",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "vat",
|
||||
),
|
||||
"Image URL 2" => array(
|
||||
"name" => "Imageurl2",
|
||||
|
||||
@@ -61,6 +61,12 @@ class WooSEA_google_shopping {
|
||||
"feed_name" => "g:mobile_link",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Checkout link template" => array(
|
||||
"name" => "checkout_link_template",
|
||||
"feed_name" => "g:checkout_link_template",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "cart_link",
|
||||
),
|
||||
),
|
||||
"Price & availability" => array(
|
||||
"Stock status" => array(
|
||||
@@ -127,6 +133,11 @@ class WooSEA_google_shopping {
|
||||
"feed_name" => "g:loyalty_points",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Auto pricing min price" => array(
|
||||
"name" => "auto_pricing_min_price",
|
||||
"feed_name" => "g:auto_pricing_min_price",
|
||||
"format" => "optional",
|
||||
),
|
||||
),
|
||||
"Product category" => array(
|
||||
"Google product category" => array(
|
||||
@@ -139,7 +150,7 @@ class WooSEA_google_shopping {
|
||||
"name" => "product_type",
|
||||
"feed_name" => "g:product_type",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "raw_categories",
|
||||
"woo_suggest" => "category_path",
|
||||
),
|
||||
),
|
||||
"Product identifiers" => array(
|
||||
@@ -290,9 +301,29 @@ class WooSEA_google_shopping {
|
||||
"feed_name" => "g:promotion_id",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Included destination" => array(
|
||||
"name" => "included_destination",
|
||||
"feed_name" => "included_destination",
|
||||
"Included destination 1" => array(
|
||||
"name" => "included_destination_1",
|
||||
"feed_name" => "g:included_destination",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Included destination 2" => array(
|
||||
"name" => "included_destination_2",
|
||||
"feed_name" => "g:included_destination",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Included destination 3" => array(
|
||||
"name" => "included_destination_3",
|
||||
"feed_name" => "g:included_destination",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Included destination 4" => array(
|
||||
"name" => "included_destination_4",
|
||||
"feed_name" => "g:included_destination",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Included destination 5" => array(
|
||||
"name" => "included_destination_5",
|
||||
"feed_name" => "g:included_destination",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Ads grouping" => array(
|
||||
@@ -421,8 +452,18 @@ class WooSEA_google_shopping {
|
||||
"feed_name" => "g:consumer_datasheet",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Consumer notice" => array(
|
||||
"name" => "consumer_notice",
|
||||
"Consumer notice 1" => array(
|
||||
"name" => "consumer_notice_1",
|
||||
"feed_name" => "g:consumer_notice",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Consumer notice 2" => array(
|
||||
"name" => "consumer_notice_2",
|
||||
"feed_name" => "g:consumer_notice",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Consumer notice 3" => array(
|
||||
"name" => "consumer_notice_3",
|
||||
"feed_name" => "g:consumer_notice",
|
||||
"format" => "optional",
|
||||
),
|
||||
@@ -436,8 +477,53 @@ class WooSEA_google_shopping {
|
||||
"feed_name" => "g:shopping_ads_excluded_country",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail" => array(
|
||||
"name" => "product_detail",
|
||||
"Product detail 1" => array(
|
||||
"name" => "product_detail_1",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 2" => array(
|
||||
"name" => "product_detail_2",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 3" => array(
|
||||
"name" => "product_detail_3",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 4" => array(
|
||||
"name" => "product_detail_4",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 5" => array(
|
||||
"name" => "product_detail_5",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 6" => array(
|
||||
"name" => "product_detail_6",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 7" => array(
|
||||
"name" => "product_detail_7",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 8" => array(
|
||||
"name" => "product_detail_8",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 9" => array(
|
||||
"name" => "product_detail_9",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Product detail 10" => array(
|
||||
"name" => "product_detail_10",
|
||||
"feed_name" => "g:product_detail",
|
||||
"format" => "optional",
|
||||
),
|
||||
@@ -626,6 +712,31 @@ class WooSEA_google_shopping {
|
||||
"feed_name" => "g:display_ads_value",
|
||||
"format" => "optional",
|
||||
),
|
||||
"3D model link" => array(
|
||||
"name" => "virtual_model_link",
|
||||
"feed_name" => "g:virtual_model_link",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Certification" => array(
|
||||
"name" => "certification",
|
||||
"feed_name" => "g:certification",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Lifestyle image link" => array(
|
||||
"name" => "lifestyle_image_link",
|
||||
"feed_name" => "g:lifestyle_image_link",
|
||||
"format" => "optional",
|
||||
),
|
||||
"External seller ID" => array(
|
||||
"name" => "external_seller_id",
|
||||
"feed_name" => "g:external_seller_id",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Pause" => array(
|
||||
"name" => "pause",
|
||||
"feed_name" => "g:pause",
|
||||
"format" => "optional",
|
||||
),
|
||||
),
|
||||
);
|
||||
return $google_attributes;
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/**
|
||||
* Settings for PriceRunner feeds
|
||||
*/
|
||||
class WooSEA_pricerunner {
|
||||
public $pricerunner;
|
||||
|
||||
public static function get_channel_attributes() {
|
||||
|
||||
$sitename = get_option('blogname');
|
||||
|
||||
$pricerunner = array(
|
||||
"Feed fields" => array(
|
||||
"ProductId" => array(
|
||||
"name" => "ProductId",
|
||||
"feed_name" => "ProductId",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "id",
|
||||
),
|
||||
"ProductName" => array(
|
||||
"name" => "ProductName",
|
||||
"feed_name" => "ProductName",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "title",
|
||||
),
|
||||
"Price" => array(
|
||||
"name" => "Price",
|
||||
"feed_name" => "Price",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "price",
|
||||
),
|
||||
"ShippingCost" => array(
|
||||
"name" => "ShippingCost",
|
||||
"feed_name" => "ShippingCost",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "shipping_price",
|
||||
),
|
||||
"StockStatus" => array(
|
||||
"name" => "StockStatus",
|
||||
"feed_name" => "StockStatus",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "availability",
|
||||
),
|
||||
"LeadTime" => array(
|
||||
"name" => "LeadTime",
|
||||
"feed_name" => "LeadTime",
|
||||
"format" => "required",
|
||||
),
|
||||
"Brand" => array(
|
||||
"name" => "Brand",
|
||||
"feed_name" => "Brand",
|
||||
"format" => "required",
|
||||
),
|
||||
"SKU" => array(
|
||||
"name" => "Msku",
|
||||
"feed_name" => "Msku",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "sku",
|
||||
),
|
||||
"EAN / GTIN" => array(
|
||||
"name" => "EAN",
|
||||
"feed_name" => "EAN",
|
||||
"format" => "required",
|
||||
),
|
||||
"Url" => array(
|
||||
"name" => "Url",
|
||||
"feed_name" => "Url",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "link",
|
||||
),
|
||||
"ImageUrl" => array(
|
||||
"name" => "ImageUrl",
|
||||
"feed_name" => "ImageUrl",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "image",
|
||||
),
|
||||
"Category" => array(
|
||||
"name" => "Category",
|
||||
"feed_name" => "Category",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "category_path_short",
|
||||
),
|
||||
"Description" => array(
|
||||
"name" => "Description",
|
||||
"feed_name" => "Description",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "description",
|
||||
),
|
||||
"AdultContent" => array(
|
||||
"name" => "AdultContent",
|
||||
"feed_name" => "AdultContent",
|
||||
"format" => "optional",
|
||||
),
|
||||
"AgeGroup" => array(
|
||||
"name" => "AgeGroup",
|
||||
"feed_name" => "AgeGroup",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Bundled" => array(
|
||||
"name" => "Bundled",
|
||||
"feed_name" => "Bundled",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Color" => array(
|
||||
"name" => "Color",
|
||||
"feed_name" => "Color",
|
||||
"format" => "optional",
|
||||
),
|
||||
"EnergyEfficiencyClass" => array(
|
||||
"name" => "EnergyEfficiencyClass",
|
||||
"feed_name" => "EnergyEfficiencyClass",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Gender" => array(
|
||||
"name" => "Gender",
|
||||
"feed_name" => "Gender",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Condition" => array(
|
||||
"name" => "Condition",
|
||||
"feed_name" => "Condition",
|
||||
"format" => "optional",
|
||||
),
|
||||
"GroupId" => array(
|
||||
"name" => "GroupId",
|
||||
"feed_name" => "GroupId",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Material" => array(
|
||||
"name" => "Material",
|
||||
"feed_name" => "Material",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Multipack" => array(
|
||||
"name" => "Multipack",
|
||||
"feed_name" => "Multipack",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Pattern" => array(
|
||||
"name" => "Pattern",
|
||||
"feed_name" => "Pattern",
|
||||
"format" => "optional",
|
||||
),
|
||||
"Size" => array(
|
||||
"name" => "Size",
|
||||
"feed_name" => "Size",
|
||||
"format" => "optional",
|
||||
),
|
||||
"SizeSystem" => array(
|
||||
"name" => "SizeSystem",
|
||||
"feed_name" => "SizeSystem",
|
||||
"format" => "optional",
|
||||
),
|
||||
),
|
||||
);
|
||||
return $pricerunner;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -55,9 +55,9 @@ class WooSEA_shopflix {
|
||||
"format" => "required",
|
||||
"woo_suggest" => "link",
|
||||
),
|
||||
"Main Photo URL" => array(
|
||||
"name" => "main_photo_url",
|
||||
"feed_name" => "main_photo_url",
|
||||
"Image" => array(
|
||||
"name" => "image",
|
||||
"feed_name" => "image",
|
||||
"format" => "required",
|
||||
"woo_suggest" => "image",
|
||||
),
|
||||
|
||||
@@ -404,8 +404,8 @@ class WooSEA_Activation {
|
||||
"Pricerunner" => array (
|
||||
"channel_hash" => md5("Pricerunner.dk"),
|
||||
"name" => "Pricerunner.dk",
|
||||
"fields" => "google_shopping",
|
||||
"taxonomy" => "google_shopping",
|
||||
"fields" => "pricerunner",
|
||||
"taxonomy" => "none",
|
||||
"utm_source" => "Pricerunner.dk",
|
||||
"type" => "Comparison shopping engine" ),
|
||||
"Shopalike" => array (
|
||||
@@ -567,8 +567,8 @@ class WooSEA_Activation {
|
||||
"Pricerunner.fr" => array (
|
||||
"channel_hash" => md5("Pricerunner.fr"),
|
||||
"name" => "Pricerunner.fr",
|
||||
"fields" => "google_shopping",
|
||||
"taxonomy" => "google_shopping",
|
||||
"fields" => "pricerunner",
|
||||
"taxonomy" => "none",
|
||||
"utm_source" => "Pricerunner.fr",
|
||||
"type" => "Comparison shopping engine" ),
|
||||
"ShopAlike.fr" => array (
|
||||
@@ -839,8 +839,8 @@ class WooSEA_Activation {
|
||||
"Pricerunner.de" => array (
|
||||
"channel_hash" => md5("Pricerunner.de"),
|
||||
"name" => "Pricerunner.de",
|
||||
"fields" => "google_shopping",
|
||||
"taxonomy" => "google_shopping",
|
||||
"fields" => "pricerunner",
|
||||
"taxonomy" => "none",
|
||||
"utm_source" => "Pricerunner.de",
|
||||
"type" => "Comparison shopping engine" ),
|
||||
"Rakuten.de" => array (
|
||||
@@ -1305,7 +1305,7 @@ class WooSEA_Activation {
|
||||
"fields" => "customfeed",
|
||||
"taxonomy" => "none",
|
||||
"utm_source" => "Adform.pl",
|
||||
"type" => "Advertising" ),
|
||||
"type" => "Advertising" ),
|
||||
"Cenowarka" => array (
|
||||
"channel_hash" => md5("Cenowarka.pl"),
|
||||
"name" => "Cenowarka.pl",
|
||||
@@ -1358,6 +1358,7 @@ class WooSEA_Activation {
|
||||
"utm_source" => "Kuantokusta.pt",
|
||||
"type" => "Comparison shopping engine" ),
|
||||
),
|
||||
"Puerto Rico" => array (),
|
||||
"Qatar" => array (),
|
||||
"Reunion" => array (),
|
||||
"Romania" => array (
|
||||
@@ -1521,8 +1522,8 @@ class WooSEA_Activation {
|
||||
"Pricerunner" => array (
|
||||
"channel_hash" => md5("Pricerunner.se"),
|
||||
"name" => "Pricerunner.se",
|
||||
"fields" => "google_shopping",
|
||||
"taxonomy" => "google_shopping",
|
||||
"fields" => "pricerunner",
|
||||
"taxonomy" => "none",
|
||||
"utm_source" => "Pricerunner.se",
|
||||
"type" => "Comparison shopping engine" ),
|
||||
"Miinto" => array (
|
||||
@@ -1681,8 +1682,8 @@ class WooSEA_Activation {
|
||||
"Pricerunner" => array (
|
||||
"channel_hash" => md5("Pricerunner.co.uk"),
|
||||
"name" => "Pricerunner.co.uk",
|
||||
"fields" => "google_shopping",
|
||||
"taxonomy" => "google_shopping",
|
||||
"fields" => "pricerunner",
|
||||
"taxonomy" => "none",
|
||||
"utm_source" => "Pricerunner.co.uk",
|
||||
"type" => "Comparison shopping engine" ),
|
||||
"Pricespy" => array (
|
||||
@@ -1938,5 +1939,14 @@ class WooSEA_Activation {
|
||||
$new_activation = $count_activation+1;
|
||||
update_option ( 'woosea_count_activation', $new_activation );
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the debug.log file from the uploads directory if it exists.
|
||||
*/
|
||||
$upload_dir = wp_upload_dir();
|
||||
$debug_file = $upload_dir['basedir'] . "/woo-product-feed-pro/logs/debug.log";
|
||||
if ( file_exists($debug_file)) {
|
||||
unlink($debug_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,42 +10,17 @@ class WooSEA_Get_Admin_Notifications {
|
||||
}
|
||||
|
||||
public function woosea_debug_informations ($versions, $product_numbers, $order_rows, $cron_objects) {
|
||||
$upload_dir = wp_upload_dir();
|
||||
$filename = "debug";
|
||||
// Log timestamp
|
||||
$debug_info = "\n";
|
||||
$debug_info .= date("F j, Y, g:i a"); // e.g. March 10, 2001, 5:16 pm
|
||||
$debug_info .= "\n";
|
||||
|
||||
$base = $upload_dir['basedir'];
|
||||
$path = $base . "/woo-product-feed-pro/logs";
|
||||
$file = $path . "/". $filename ."." ."log";
|
||||
$debug_info .= print_r($versions, true);
|
||||
$debug_info .= print_r($product_numbers, true);
|
||||
$debug_info .= print_r($cron_objects, true);
|
||||
$debug_info .= print_r($order_rows, true);
|
||||
|
||||
// Remove the previous file, preventing the file from becoming to big
|
||||
if ( file_exists ( $file ) ){
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
// External location for downloading the file
|
||||
$external_base = $upload_dir['baseurl'];
|
||||
$external_path = $external_base . "/woo-product-feed-pro/logs";
|
||||
$external_file = $external_path . "/" . $filename ."." ."log";
|
||||
|
||||
// Check if directory in uploads exists, if not create one
|
||||
if ( ! file_exists( $path ) ) {
|
||||
wp_mkdir_p( $path );
|
||||
}
|
||||
|
||||
// Log timestamp
|
||||
$today = "\n";
|
||||
$today .= date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
|
||||
$today .= "\n";
|
||||
|
||||
$fp = fopen($file, 'a+');
|
||||
fwrite($fp, $today);
|
||||
fwrite($fp, print_r($versions, TRUE));
|
||||
fwrite($fp, print_r($product_numbers, TRUE));
|
||||
fwrite($fp, print_r($cron_objects, TRUE));
|
||||
fwrite($fp, print_r($order_rows, TRUE));
|
||||
fclose($fp);
|
||||
|
||||
return $this->notification_details = $external_file;
|
||||
return $debug_info;
|
||||
}
|
||||
|
||||
public function get_admin_notifications ( $step, $error ) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* This class is called to: retrieve product attributes
|
||||
* for populating the rules dropdowns and draggable boxes
|
||||
*/
|
||||
|
||||
class WooSEA_Attributes {
|
||||
|
||||
public $attributes;
|
||||
@@ -49,8 +48,8 @@ private function get_dynamic_attributes(){
|
||||
$list = array();
|
||||
|
||||
$no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
|
||||
$taxonomies = get_taxonomies();
|
||||
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
||||
$taxonomies = get_taxonomies();
|
||||
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
||||
|
||||
# get custom taxonomy values for a product
|
||||
foreach($diff_taxonomies as $tax_diff){
|
||||
@@ -246,8 +245,11 @@ public function get_mapping_attributes_dropdown() {
|
||||
"regular_price" => "Regular price",
|
||||
"sale_price" => "Sale price",
|
||||
"net_price" => "Price excl. VAT",
|
||||
"net_regular_price" => "Regular price excl. VAT",
|
||||
"net_price_rounded" => "Price excl. VAT rounded",
|
||||
"net_regular_price" => "Regular price excl. VAT",
|
||||
"net_regular_price_rounded" => "Regular price excl. VAT rounded",
|
||||
"net_sale_price" => "Sale price excl. VAT",
|
||||
"net_sale_price_rounded" => "Sale price excl. VAT rounded",
|
||||
"price_forced" => "Price incl. VAT front end",
|
||||
"regular_price_forced" => "Regular price incl. VAT front end",
|
||||
"sale_price_forced" => "Sale price incl. VAT front end",
|
||||
@@ -282,10 +284,12 @@ public function get_mapping_attributes_dropdown() {
|
||||
"link_no_tracking" => "Link without parameters",
|
||||
"variable_link" => "Product variable link",
|
||||
"add_to_cart_link" => "Add to cart link",
|
||||
"cart_link" => "Cart link",
|
||||
"product_creation_date" => "Product creation date",
|
||||
"days_back_created" => "Product days back created",
|
||||
"currency" => "Currency",
|
||||
"categories" => "Category",
|
||||
"raw_categories" => "Category (not used for mapping)",
|
||||
"category_link" => "Category link",
|
||||
"category_path" => "Category path",
|
||||
"category_path_short" => "Category path short",
|
||||
@@ -324,7 +328,8 @@ public function get_mapping_attributes_dropdown() {
|
||||
"total_product_orders" => "Total product orders",
|
||||
"tax_status" => "Tax status",
|
||||
"tax_class" => "Tax class",
|
||||
"featured" => "Featured",
|
||||
"vat" => "VAT",
|
||||
"featured" => "Featured",
|
||||
"item_group_id" => "Item group ID",
|
||||
"weight" => "Weight",
|
||||
"width" => "Width",
|
||||
@@ -436,6 +441,7 @@ public function get_mapping_attributes_dropdown() {
|
||||
$dropdown .= "<option value='product_tag_space'>Product tags space</option>";
|
||||
$dropdown .= "<option value='menu_order'>Menu order</option>";
|
||||
$dropdown .= "<option value='reviews'>Reviews</option>";
|
||||
$dropdown .= "<option value='review_rating'>Review rating</option>";
|
||||
$dropdown .= "<option value='author'>Author</option>";
|
||||
$dropdown .= "</optgroup>";
|
||||
|
||||
@@ -483,7 +489,8 @@ public function get_mapping_attributes_dropdown() {
|
||||
"link" => "Link",
|
||||
"link_no_tracking" => "Link without parameters",
|
||||
"variable_link" => "Product variable link",
|
||||
"add_to_cart_link" => "Add to cart link",
|
||||
"add_to_cart_link" => "Add to cart link",
|
||||
"cart_link" => "Cart link",
|
||||
"image" => "Main image",
|
||||
"image_all" => "Main image simple and variations",
|
||||
"feature_image" => "Feature image",
|
||||
@@ -497,6 +504,7 @@ public function get_mapping_attributes_dropdown() {
|
||||
"featured" => "Featured",
|
||||
"tax_status" => "Tax status",
|
||||
"tax_class" => "Tax class",
|
||||
"vat" => "VAT",
|
||||
"currency" => "Currency",
|
||||
"categories" => "Category",
|
||||
"raw_categories" => "Category (not used for mapping)",
|
||||
@@ -532,8 +540,11 @@ public function get_mapping_attributes_dropdown() {
|
||||
"regular_price" => "Regular price",
|
||||
"sale_price" => "Sale price",
|
||||
"net_price" => "Price excl. VAT",
|
||||
"net_regular_price" => "Regular price excl. VAT",
|
||||
"net_sale_price" => "Sale price excl. VAT",
|
||||
"net_price_rounded" => "Price excl. VAT rounded",
|
||||
"net_regular_price" => "Regular price excl. VAT",
|
||||
"net_regular_price_rounded" => "Regular price excl. VAT rounded",
|
||||
"net_sale_price" => "Sale price excl. VAT",
|
||||
"net_sale_price_rounded" => "Sale price excl. VAT rounded",
|
||||
"price_forced" => "Price incl. VAT front end",
|
||||
"regular_price_forced" => "Regular price incl. VAT front end",
|
||||
"sale_price_forced" => "Sale price incl. VAT front end",
|
||||
@@ -610,10 +621,23 @@ public function get_mapping_attributes_dropdown() {
|
||||
"calculated" => "Plugin calculation",
|
||||
"product_tag" => "Product tags",
|
||||
"product_tag_space" => "Product tags space",
|
||||
"product_detail" => "Product detail",
|
||||
"product_detail 1" => "Product detail 1",
|
||||
"product_detail 2" => "Product detail 2",
|
||||
"product_detail 3" => "Product detail 3",
|
||||
"product_detail 4" => "Product detail 4",
|
||||
"product_detail 5" => "Product detail 5",
|
||||
"product_detail 6" => "Product detail 6",
|
||||
"product_detail 7" => "Product detail 7",
|
||||
"product_detail 8" => "Product detail 8",
|
||||
"product_detail 9" => "Product detail 9",
|
||||
"product_detail 10" => "Product detail 10",
|
||||
"product_highlight" => "Product highlight",
|
||||
"consumer_notice_1" => "Consumer notice 1",
|
||||
"consumer_notice_2" => "Consumer notice 2",
|
||||
"consumer_notice_3" => "Consumer notice 3",
|
||||
"menu_order" => "Menu order",
|
||||
"reviews" => "Reviews",
|
||||
"review_rating" => "Review rating",
|
||||
"author" => "Author",
|
||||
);
|
||||
|
||||
@@ -631,9 +655,11 @@ public function get_mapping_attributes_dropdown() {
|
||||
$custom_attributes['custom_attributes__aioseop_title'] = "All in one seo pack title";
|
||||
$custom_attributes['custom_attributes__aioseop_description'] = "All in one seo pack description";
|
||||
}
|
||||
|
||||
array_walk($custom_attributes, function(&$value, $key) { $value .= ' (Custom attribute)';});
|
||||
$attributes = array_merge($attributes, $custom_attributes);
|
||||
|
||||
if (is_array($custom_attributes)){
|
||||
array_walk($custom_attributes, function(&$value, $key) { $value .= ' (Custom attribute)';});
|
||||
$attributes = array_merge($attributes, $custom_attributes);
|
||||
}
|
||||
|
||||
$attributes = array_merge($attributes, $static);
|
||||
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
<?php
|
||||
class WooSEA_Caching {
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by LiteSpeed
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
function litespeed_cache() {
|
||||
if ( ! class_exists( 'LiteSpeed\Core' ) || ! defined( 'LSCWP_DIR' ) ) {
|
||||
return false;
|
||||
}
|
||||
$litespeed_ex_paths = maybe_unserialize( get_option( 'litespeed.conf.cdn-exc' ) );
|
||||
if ( $litespeed_ex_paths && is_array( $litespeed_ex_paths ) && ! in_array( '/wp-content/uploads/woo-product-feed-pro', $litespeed_ex_paths ) ) {
|
||||
$litespeed_ex_paths = array_merge(
|
||||
$litespeed_ex_paths,
|
||||
array( '/wp-content/uploads/woo-product-feed-pro' )
|
||||
);
|
||||
update_option( 'litespeed.conf.cdn-exc', $litespeed_ex_paths );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by WP Fastest
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function wp_fastest_cache() {
|
||||
|
||||
if ( ! class_exists( 'WpFastestCache' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$wp_fastest_cache_ex_paths = json_decode( get_option( 'WpFastestCacheExclude' ), false );
|
||||
if ( $wp_fastest_cache_ex_paths && is_array( $wp_fastest_cache_ex_paths ) ) {
|
||||
$feed_path_exist = false;
|
||||
|
||||
foreach ( $wp_fastest_cache_ex_paths as $path ) {
|
||||
if ( 'woo-product-feed-pro' === $path->content ) {
|
||||
$feed_path_exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $feed_path_exist ) {
|
||||
$new_rule = new stdClass();
|
||||
$new_rule->prefix = "contain";
|
||||
$new_rule->content = 'woo-product-feed-pro';
|
||||
$new_rule->type = "page";
|
||||
|
||||
$wp_fastest_cache_ex_paths = array_merge(
|
||||
$wp_fastest_cache_ex_paths,
|
||||
[ $new_rule ]
|
||||
);
|
||||
|
||||
update_option( 'WpFastestCacheExclude', wp_json_encode( $wp_fastest_cache_ex_paths ) );
|
||||
}
|
||||
} elseif ( empty( $wp_fastest_cache_ex_paths ) ) {
|
||||
$wp_fastest_cache_ex_paths = [];
|
||||
$new_rule = new stdClass();
|
||||
$new_rule->prefix = "contain";
|
||||
$new_rule->content = 'woo-product-feed-pro';
|
||||
$new_rule->type = "page";
|
||||
|
||||
$wp_fastest_cache_ex_paths = array_merge(
|
||||
$wp_fastest_cache_ex_paths,
|
||||
[ $new_rule ]
|
||||
);
|
||||
|
||||
update_option( 'WpFastestCacheExclude', wp_json_encode( $wp_fastest_cache_ex_paths ) );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by WP Super
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function wp_super_cache() {
|
||||
|
||||
if ( ! function_exists( 'wpsc_init' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$wp_super_ex_paths = get_option( 'ossdl_off_exclude' );
|
||||
if ( $wp_super_ex_paths && strpos( $wp_super_ex_paths, 'woo-product-feed-pro' ) === false ) {
|
||||
$wp_super_ex_paths = explode( ',', $wp_super_ex_paths );
|
||||
$wp_super_ex_paths = array_merge( $wp_super_ex_paths, [ 'woo-product-feed-pro' ] );
|
||||
update_option( 'ossdl_off_exclude', implode( ',', $wp_super_ex_paths ) );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by BREEZE
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function breeze_cache() {
|
||||
|
||||
if ( ! class_exists( 'Breeze_Admin' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$breeze_settings = maybe_unserialize( get_option( 'breeze_cdn_integration' ) );
|
||||
if ( is_array( $breeze_settings ) ) {
|
||||
$woo_product_feed_pro_files = [ '.xml', '.csv', '.tsv', '.txt', '.xls' ];
|
||||
$woo_product_feed_pro_files = array_unique( array_merge( $woo_product_feed_pro_files, $breeze_settings['cdn-exclude-content'] ) );
|
||||
$breeze_settings['cdn-exclude-content'] = $woo_product_feed_pro_files;
|
||||
update_option( 'breeze_cdn_integration', $breeze_settings );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by WP Optimize
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function wp_optimize_cache() {
|
||||
|
||||
if ( ! class_exists( 'WP_Optimize' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$wp_optimize_ex_paths = maybe_unserialize( get_option( 'wpo_cache_config' ) );
|
||||
// If page Caching enabled
|
||||
if ( isset( $wp_optimize_ex_paths['enable_page_caching'] ) && $wp_optimize_ex_paths['enable_page_caching'] && is_array( $wp_optimize_ex_paths ) && ! in_array( '/wp-content/uploads/woo-product-feed-pro', $wp_optimize_ex_paths['cache_exception_urls'], true ) ) {
|
||||
$woo_feed_ex_path['cache_exception_urls'] = [ '/wp-content/uploads/woo-product-feed-pro' ];
|
||||
$wp_optimize_ex_paths = array_merge_recursive(
|
||||
$wp_optimize_ex_paths,
|
||||
$woo_feed_ex_path
|
||||
);
|
||||
update_option( 'wpo_cache_config', $wp_optimize_ex_paths );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by Cache Enabler
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function cache_enabler_cache() {
|
||||
|
||||
if ( ! class_exists( 'Cache_Enabler' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$cache_enabler_ex_paths = maybe_unserialize( get_option( 'cache_enabler' ) );
|
||||
if ( isset( $cache_enabler_ex_paths['excluded_page_paths'] ) && empty( $cache_enabler_ex_paths['excluded_page_paths'] ) ) {
|
||||
$cache_enabler_ex_paths['excluded_page_paths'] = '/wp-content/uploads/woo-product-feed-pro/';
|
||||
update_option( 'cache_enabler', $cache_enabler_ex_paths );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by Swift Performance
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function swift_performance_cache() {
|
||||
|
||||
if ( ! class_exists( 'Swift_Performance_Lite' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$swift_perform_ex_paths = maybe_unserialize( get_option( 'swift_performance_options' ) );
|
||||
|
||||
if ( $swift_perform_ex_paths && isset( $swift_perform_ex_paths['exclude-strings'] ) ) {
|
||||
$exclude_strings = $swift_perform_ex_paths['exclude-strings'];
|
||||
if ( is_array( $exclude_strings ) && ! in_array( '/wp-content/uploads/woo-product-feed-pro', $exclude_strings, true ) ) {
|
||||
$woo_feed_ex_path['exclude-strings'] = [ '/wp-content/uploads/woo-product-feed-pro' ];
|
||||
$swift_perform_ex_paths = array_merge_recursive(
|
||||
$swift_perform_ex_paths,
|
||||
$woo_feed_ex_path
|
||||
);
|
||||
} else {
|
||||
$swift_perform_ex_paths['exclude-strings'] = [ '/wp-content/uploads/woo-product-feed-pro' ];
|
||||
}
|
||||
update_option( 'swift_performance_options', $swift_perform_ex_paths );
|
||||
} elseif ( empty( $swift_perform_ex_paths ) ) {
|
||||
$swift_perform_ex_paths['exclude-strings'] = [ '/wp-content/uploads/woo-product-feed-pro' ];
|
||||
update_option( 'swift_performance_options', $swift_perform_ex_paths );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by Comet Cache
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function comet_cache() {
|
||||
if ( ! is_plugin_active( 'comet-cache/comet-cache.php' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$comet_cache_settings = maybe_unserialize( get_option( 'comet_cache_options' ) );
|
||||
|
||||
if ( $comet_cache_settings && isset( $comet_cache_settings['exclude_uris'] ) ) {
|
||||
$exclude_uris = $comet_cache_settings['exclude_uris'];
|
||||
if ( strpos( $exclude_uris, '/wp-content/uploads/woo-product-feed-pro' ) === false ) {
|
||||
$exclude_uris .= "\n/wp-content/uploads/woo-product-feed-pro";
|
||||
$comet_cache_settings['exclude_uris'] = $exclude_uris;
|
||||
update_option( 'comet_cache_options', $comet_cache_settings );
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude Feed URL from being cached by Hyper Caching
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
public function hyper_cache() {
|
||||
|
||||
if ( ! class_exists( 'HyperCache' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$hyper_cache_settings = maybe_unserialize( get_option( 'hyper-cache' ) );
|
||||
if ( $hyper_cache_settings && isset( $hyper_cache_settings['reject_uris'] ) ) {
|
||||
$exclude_strings = $hyper_cache_settings['reject_uris'];
|
||||
if ( is_array( $exclude_strings ) && ! in_array( '/wp-content/uploads/woo-product-feed-pro', $exclude_strings, true ) ) {
|
||||
$woo_feed_ex_path['reject_uris'] = [ '/wp-content/uploads/woo-product-feed-pro' ];
|
||||
$woo_feed_ex_path['reject_uris_enabled'] = 1;
|
||||
$hyper_cache_settings = array_merge_recursive(
|
||||
$hyper_cache_settings,
|
||||
$woo_feed_ex_path
|
||||
);
|
||||
}
|
||||
update_option( 'hyper-cache', $hyper_cache_settings );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -215,6 +215,15 @@ class WooSEA_Update_Project {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Did the option to preview the feed got disabled?
|
||||
*/
|
||||
if(array_key_exists('fileformat', $project_data)){
|
||||
if(!array_key_exists('preview_feed', $project_data)) {
|
||||
unset($project_config['preview_feed']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Did all the filters got removed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user