• Resolved CooperDevon

    (@cooperdevon)


    Woocommerce automatically removes the “Add to cart” button if the product is out of stock, but only for simple products, not for variable products!
    Variations are not eliminated either.
    I can’t find an effective solution.

    How can I hide the “Add to Cart” Button of an out of stock variable product?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    It sounds like variable products still show an add-to-cart button on the product page. Did I get that correctly? If so, what happens when a user tries to add that out-of-stock product to the cart?

    It would be helpful if you can share with us a direct URL to a product that presents this behavior.

    Thread Starter CooperDevon

    (@cooperdevon)

    You got it right, the Cart button is not gone if the variation is out of stock.
    If you click on the add to cart button a window pops up:

    Sorry, this product is unavailable. Please choose a different combination.

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    Can you share a link to that product page, please? Also specify which variations does this happen with.

    Thread Starter CooperDevon

    (@cooperdevon)

    Can I send you somehow a message or an email?
    Than I am happy to share my website link with you. And I am just using the Variable Product.

    Plugin Support Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    Not directly, I’m afraid.

    I’ve been testing this on my end but have been unable to reproduce the issue you described. The expected behavior is that, if a variation becomes unavailable, it will not even show the option for users to select it.

    You might want to do a conflict test. Here’s what I’d suggest:

    1. Switch the theme of your website to the free Storefront theme.

    2. Deactivate all the plugins except for WooCommerce and check if the issue persists. If the problem is resolved then please move on to the next step.

    3. Activate features one by one while testing for the issue, until you find the one that is causing this behavior.

    I’d recommend taking these steps on a staging site, which is a clone of your live site that you can modify without risking making any permanent damage to your live site. You can create it using a plugin like WP-Staging. This plugin lets you copy and redeploy a WordPress site with minimal work.

    Plugin Support Rynald0s.a11n

    (@rynald0s)

    Automattic Happiness Engineer

    Howdy!

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please start a new thread.

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Add to Cart button in variable products out of stock’ is closed to new replies.