Sorry, I should have linked to this in my first comment (deleted). :::: Have you tried wp_set_object_terms outside of the Ajax call? What about the $append argument? :::: In a product that already has a variation, how does this info is stored in the database? (And this last question is just an idea of troubleshooting. At least, that what I'd also try...)
–
brasofiloDec 5 '12 at 11:32

1st: Please update your answer instead of leaving comments. 2nd: Use upper-/lowercase letters. At least this is no chat, but Q/A that should be an easy to read reference for later users as well. 3rd: Why is the problem not AJAX? 4th: If it's not AJAX and no one has understood your question so far, you might consider reworking the question.
–
kaiser♦Dec 5 '12 at 11:41

1 Answer
1

Found the solution to make a product attribute, a variation.
Lets say we have
wp_set_object_terms( $post_id, 'XL', 'pa_size' );
The above is a custom attribute (a size attribute). Making it a variation will look like