update
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user