• Resolved wrapwooc

    (@wrapwooc)


    Looking for options to gray-out sold out product variables in a dropdown list so user can see which options are sold out and which are available, OR, second choice, remove sold out product variable when it is sold out. Since there are approx. 150 product variables in various categories editing each individually is not a good option.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Saif

    (@babylon1999)

    Hello @wrapwooc,

    You can check this Stackoverflow thread on how to add a “sold-out” text next to the variations name, the thread is a bit outdated but I can confirm the snippet still works. :?)

    You can try adding it to your functions.php file or use a plugin like Code snippet.

    Alternatively, you can remove out-of-stock variations altogether by checking this box in WooCommerce > Settings > Products.


    Link to image: https://d.pr/i/pguNIz

    Hope this helps!

    Thread Starter wrapwooc

    (@wrapwooc)

    Thanks, I had already tried checking “Hide out of stock items from the catalog” which had no effect. I tried adding the code you suggested to functions.php and got a fatal error when trying to edit product variations.. The site is using the Avada theme. I did find a way to hide out of stock product variables in the dropdown with some php code I found on Stackoverflow. Thanks for your tips, very much appreciated.

    Hi,

    I was testing another code snippet that is available in this web article: Disable out of stock variations, and it is hiding the variations that are out of stock on my end. Please try it to see if that works on your end.

    If you would like to run the snippet on a staging environment, we recommend WP Staging, that way, you will not have to touch your live site.

    Hope this helps.

    Thread Starter wrapwooc

    (@wrapwooc)

    Thank you, I found a snippet similar to this that hides out of stock variations.

    Hi @wrapwooc ,

    Glad to hear that you have found a workable solution!

    I will go ahead and mark this as resolved then – feel free to create a new topic if you need further help ??

    Also, if you have a minute, we’d love it if you could leave us a review:?

    https://www.ads-software.com/support/plugin/woocommerce/reviews/

    Cheers

    @wrapwooc I would love to know what other code you found here, because I am in the same boat, where literally every snippet I found via Googling has zero effect on my site.

    Hi @jmo1112

    I would love to know what other code you found here, because I am in the same boat, where literally every snippet I found via Googling has zero effect on my site.

    From what I understand, you’re experiencing a similar issue to @wrapwooc regarding the display of sold-out product variations. I recommend trying the solution suggested by @ihereira which involves using a code snippet available in the article “Disable Out of Stock Variations in WooCommerce“. This has been successful in hiding out-of-stock variations for some users.

    ?? Just a heads up – while we’re always here to assist you, our scope of support doesn’t extend to custom development or design patterns, which includes troubleshooting or giving specific advice on using custom action hooks or filters.

    For custom solutions, our recommendation is to connect with Codeable.io, our trusted WooCommerce development partner. They’re experts in crafting custom solutions for WooCommerce and might be able to help you develop a custom solution for your problem. Check them out here: ?? https://woocommerce.com/codeable

    I hope this helps! If you need more guidance or have other questions, don’t hesitate to reach out.

    Thread Starter wrapwooc

    (@wrapwooc)

    @jmo1112 I was not able to find a way to grey-out the sold out products, so I used a snippet that hides sold out products. You can find the suggestions in the previous comments.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Gray-out sold out product variables in a dropdown’ is closed to new replies.