I am trying to ensure that all out of stock products are only displayed after in-stock products have been displayed. I have tried the code that is here: https://www.businessbloomer.com/woocommerce-show-in-stock-products-first-shop/
but this code does not appear to have any effect. I suspect it is because ATUM is managing the stock and this code is referring to fields from Woocommerce stock management. The specific code that I used is as follows:
add_filter( 'woocommerce_get_catalog_ordering_args', 'bbloomer_first_sort_by_stock_amount', 9999 );
function bbloomer_first_sort_by_stock_amount( $args ) {
$args['orderby'] = 'meta_value';
$args['meta_key'] = '_stock_status';
return $args;
}
Can someone suggest how to modify this code to work with ATUM inventory Mgmt?