[API] Allow get variable products by sku, closes #9330
This commit is contained in:
parent
88c7f30f7b
commit
f6526d72a7
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue