[API] Fixed products tags in write-mode

This commit is contained in:
Claudio Sanches 2015-05-29 10:05:15 -03:00
parent 88003436a6
commit b2711f3d64
1 changed files with 1 additions and 1 deletions

View File

@ -1143,7 +1143,7 @@ class WC_API_Products extends WC_API_Resource {
// Product tags
if ( isset( $data['tags'] ) && is_array( $data['tags'] ) ) {
$term_ids = array_unique( array_map( 'intval', $data['tags'] ) );
wp_set_object_terms( $product_id, $terms, 'product_tag' );
wp_set_object_terms( $product_id, $term_ids, 'product_tag' );
}
// Downloadable