Show out of stock options on shop page

You are here:
← All Topics

This article belongs to our plugin : Woocommerce Color or Image Variation Swatches

By default plugin hides out of stock options in case where no variation linked to that option exists. Optionally you can show them by using below given code snippet.

add_action('wcva_shop_outofstock_output','wcva_shop_outofstock_output_function',10,2);
function wcva_shop_outofstock_output_function($filtered_array,$all_values) {
    return $all_values;
    
}

 

Sidebar