Hide out of stock in Porto Product Attribute and Porto Best Selling Products

Hi friends, I need help to solve the product carousel problem at Porto Thema. I do not want out of stock products to appear in the “Porto Product Attribute” and “Porto Best Selling Products” product list.

This is the code that works for home. The object of the home is “Porto Recent products”. In the code I wrote and it works, it appears in the second line as ‘recent_products’.

add_filter( ‘woocommerce_shortcode_products_query’, function( $query_args, $atts, $loop_name ){
if( $loop_name == ‘recent_products’ ){
$query_args[‘meta_query’] = array( array(
‘key’ => ‘_stock_status’,
‘value’ => ‘outofstock’,
‘compare’ => ‘NOT LIKE’,
) );
}
return $query_args;
}, 10, 3);
First question: for the code to work on the object “Porto Product Attribute” on the product page, which object name should I replace ‘recent_products’ in line 2 with?

Second question: in order for the code to work on the object “Porto Best Selling Products” on the product page, which object name should I replace ‘recent_products’ in line 2 with?

Third question: the object name ‘woocommerce_shortcode_products_query’ in line 1 will work for the object “Porto Product Attribute” and for the object “Porto Best Selling Products”, correct?

Thanks.