Hi @babylon1999, thank you for your answer and your help.
Your code snippet works, but it also shows the weight (unlike the plugin). I do not want that.
Also the plugin still works. The only problem is that some attributes are now recognized as product variations, which makes absolutely no sense to me. I have simply commented out the lines mentioned in my post above and it works. But I’m curious why the new attributes are recognized as variations in the $attribute->get_variation() function, even though I don’t use variations.