Merge pull request #19676 from woocommerce/fix/19674

Fix Rest API featured filter
This commit is contained in:
Claudio Sanches 2018-04-10 11:49:03 -03:00 committed by GitHub
commit 440bef337f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -246,6 +246,7 @@ class WC_REST_Products_Controller extends WC_REST_Legacy_Products_Controller {
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
'operator' => true === $request['featured'] ? 'IN' : 'NOT IN',
);
}

View File

@ -94,6 +94,7 @@ class WC_REST_Legacy_Products_Controller extends WC_REST_CRUD_Controller {
'taxonomy' => 'product_visibility',
'field' => 'name',
'terms' => 'featured',
'operator' => true === $request['featured'] ? 'IN' : 'NOT IN',
);
}