Using the free version, I had this same problem. The “disabled” class was not added to out of stock “li.variable-item”. The above snippet worked and the class is now added. The plugin should probably be updated so we don’t have to add a custom function. Thanks for fix.