I have a custom HTML table that represents every product variations in Woocommerce. I want to blur out one of the variations from the table when that product is out of stock. How can I make a condition out of it? Is there any possible ways to make this happen? I made the table using Elementor HTML attribute.
Image of the table
Question posted in Woocommerce
The official Woocommerce documentation can be found here.
The official Woocommerce documentation can be found here.
2
Answers
I managed to do it myself and for future purposes I'll leave the answer here.
First I try to get the availability value of the product by using the code below :
Then I created a variable that will store the variation ID of the product
And lastly make a condition out of it and apply the style for each row. For this example the variation ID is 2049.
You could consider applying a CSS
blur()
filter function to your appropriate column / cells, which accepts a radius that relates to how severe of a Gaussian blur is applied to the element:Example