[API] Allow get variable products by sku, closes #9330

This commit is contained in:
Claudio Sanches 2015-10-09 16:43:12 -03:00
parent 88c7f30f7b
commit f6526d72a7
2 changed files with 4 additions and 0 deletions

View File

@ -1040,6 +1040,8 @@ class WC_API_Products extends WC_API_Resource {
'value' => $args['sku'],
'compare' => '='
);
$query_args['post_type'] = array( 'product', 'product_variation' );
}
$query_args = $this->merge_query_args( $query_args, $args );

View File

@ -610,6 +610,8 @@ class WC_API_Products extends WC_API_Resource {
'value' => $args['sku'],
'compare' => '='
);
$query_args['post_type'] = array( 'product', 'product_variation' );
}
$query_args = $this->merge_query_args( $query_args, $args );