Tagged: x
-
AuthorPosts
-
February 20, 2017 at 10:07 pm #1379204
Kevin CParticipantManaged to find this code and it works well to grey out sold out variant.
add_filter( 'woocommerce_variation_is_active', 'grey_out_variations_when_out_of_stock', 10, 2 ); function grey_out_variations_when_out_of_stock( $grey_out, $variation ) { if ( ! $variation->is_in_stock() ) return false; return true; };What can I add to add the “Sold Out” text behind these variants?
February 21, 2017 at 1:10 am #1379361
RupokMemberHi there,
Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
February 21, 2017 at 3:53 am #1379509
Kevin CParticipantHi Rupok,
Thanks for checking. I have added a screenshot, taken from another non-woocommerce site, for your reference.
February 21, 2017 at 6:28 am #1379669
LelyModeratorHello Kevin,
Please check this article for guidance:https://www.skyverge.com/blog/add-sold-out-to-woocommerce-variable-product-dropdow/
Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1379204 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
