How to programmatically link commerce products to taxonomy terms
You're close, but need to tweak setting the field value to:

$product-&gt;field_some_option[LANGUAGE_NONE][0]['tid'] = $tid;


For the taxonomy term reference field uses the 'tid' key there.

You could also do it with a metadata wrapper like: 

$wrapper = entity_metadata_wrapper('commerce_product', $product);
// Append to existing field value
$values = $wrapper-&gt;field_some_option-&gt;raw();
$values[] = $tid;
// Set field values
$wrapper-&gt;field_some_option-&gt;set($values);
$wrapper-&gt;save();