Woocommerce Variable Product Issue

For some reason the theme will not allow variable products with woocommerce, it just says ‘this product is out of stock and cannot be ordered’. Swap the theme out to 1015 and it displays fine as a variable product. Any idea how to fix this?

Here’s an example:


Just tested and it seems to be working fine. Are you sure it displays in 2015? Have you add the necessary info for variable products? That message displays only if there aren’t any variations set.

Yes definitely a problem with the theme file, I swapped it out for the standard woocommerce version and it worked, which I’ll do permanently unless there’s any specific styling I should be seeing from the theme version.

Cool, I’ve added this to my to-do list to test and see in what circumstances this happens. There’s no specific styling anymore, there used to be but some things have changed.

Great, I’ll pop the WC file into my child theme then. I don’t know PHP, all I can say is the files don’t look alike.

A suggestion if you’re going to be tinkering with layout, it’d be nice if out of stock options were grayed out of the drop down. :slight_smile:

Do you have a functions.php file in your child theme? You can add this in it:

function grey_out_variations( $grey_out, $variation ) {
    if ( ! $variation->is_in_stock() )
        return false;
    return true;
add_filter( 'woocommerce_variation_is_active', 'grey_out_variations', 10, 2 );

And then this in your child’s stylesheet:

.variations option:disabled {
    background: #ddd;