How to assign specific attribute to variation for woocommerce product?

For all of those who will be struggling with this you just simply need to use this like:

      update_post_meta($attID1, 'attribute_print_size', '8x10');
 update_post_meta($attID1, 'attribute_paper_type', 'Premium Luster Photo');

This sets the exact variations.