I have the below foreach loop running over an array of WooCommerce products, which are queried by the below query. This outputs the products in the menu_order, which is as expected, however what I need to do is to keep them in this order, EXCEPT products which as 'featured products'. These should almost be ignored by the order parameter and always appear first in the foreach loop.
Is this possible?
// Get Products
$args = array(
'status' => 'publish',
'category' => $currentCat->slug,
'orderby' => 'menu_order',
'order' => 'ASC',
'limit' => -1,
);
$productsData = wc_get_products( $args );
<? // For each product
foreach($productsData as $product): ?>
<? if( $product['isFeatured'] ): ?>
// Output featured product html here...
<? else: ?>
// Output other products HTML here...
<? endif ?>
<? endforeach ?>