Okay, David, here’s what I think is going on:
I have two attributes for my products, Finish (pa_finish) and Color (pa_color). The particular product I’m using for testing only has Color as an applicable attribute, not Finish.
On line 311 of smart-variations-images.php you assign the variable $variations the value of ‘true’. You then loop through each attribute and use the terms used by the post to create the select control. During the loop, if this particular post doesn’t use any of the terms of the current attribute (as is the case with my test product when looping through the ‘Finish’ attribute) you change the value of $variations to ‘false’. When you do the test ‘if ($variations)’ on line 329 the result is false, and your addition of the Variation Slug dropdown to the form is never created.
The bottom line is, if the product didn’t use at least one term of all of the attributes, no matter that it used some of the attributes, you’ll never see the Variation Slug control.
I propose starting out by assigning the $variations variable the value of ‘false’. Then, during the loop ‘if (!empty($fabric_values))’ on line 318 changing the value of $variations to ‘true’. You would only reach that point if the current post has at least one term of at least one of the attributes. But that’s all it takes, right? Get rid of the ‘else’ section on line 322, as it’s no longer needed. This allows me to see the Variation Slug control.
I’m going to do more testing now.
Regards