Add "Sold Out" to Woocommerce variations dropdown
<p>I figured out to grey out unavailable options for Woocommerce variable products thanks to the code on the following page: <a href="https://stackoverflow.com/questions/29879413/greying-out-out-of-stock-product-variations-woocommerce">Greying out out-of-stock product variations (WooCommerce)</a></p>

<p>I'm wondering if there's a way to add "Sold Out" text to unavailable options.
It seems there used to be a way to do this, but this doesn't work anymore. 
<a href="https://www.skyverge.com/blog/add-sold-out-to-woocommerce-variable-product-dropdow/" rel="nofollow noreferrer">https://www.skyverge.com/blog/add-sold-out-to-woocommerce-variable-product-dropdow/</a></p>

<p>Any help would be appreciated!</p>