Hide products without EAN from xml
-
Hi we build an xml and we want to get only products that have an ean number.
we work on this filter.
add_filter('xml_product_visibility_control','hide_product_wpml',11,2); function hide_product_wpml($default,$product) { $meta_query[] = array( 'key' => '_sku', 'value' => '', 'compare' => '!=', 'stock_status' =>'onbackorder', ); return $meta_query; }Now with this function, we hide products that are on backorder from our xml.
How could we modify it to hide products without an EAN number?Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Hide products without EAN from xml’ is closed to new replies.