|
@@ -46,6 +46,16 @@ class DB_Assets_Manager {
|
|
|
(
|
|
(
|
|
|
`product_variations`.`ID` = `order_products`.`variation_id`
|
|
`product_variations`.`ID` = `order_products`.`variation_id`
|
|
|
)
|
|
)
|
|
|
|
|
+ LEFT JOIN `{$wpdb->prefix}wc_product_attributes_lookup` `product_variations_attr`
|
|
|
|
|
+ ON
|
|
|
|
|
+ (
|
|
|
|
|
+ `product_variations_attr`.`product_id` = `product_variations`.`ID` AND `product_variations_attr`.`product_or_parent_id` = `products`.`ID` AND `product_variations_attr`.`taxonomy` = 'pa_format'
|
|
|
|
|
+ )
|
|
|
|
|
+ LEFT JOIN `{$wpdb->terms}` `product_variations_name`
|
|
|
|
|
+ ON
|
|
|
|
|
+ (
|
|
|
|
|
+ `product_variations_name`.`term_id` = `product_variations_attr`.`term_id`
|
|
|
|
|
+ )
|
|
|
)
|
|
)
|
|
|
LEFT JOIN `{$wpdb->postmeta}` `product_meta`
|
|
LEFT JOIN `{$wpdb->postmeta}` `product_meta`
|
|
|
ON
|
|
ON
|