WC_REST_Terms_Controller::get_terms_for_product( array $prepared_args, WP_REST_Request $request )
Get the terms attached to a product.
Description Description
This is an alternative to get_terms()
that uses get_the_terms()
instead, which hits the object cache. There are a few things not supported, notably include
, exclude
. In self::get_items()
these are instead treated as a full query.
Parameters Parameters
- $prepared_args
-
(Required) Arguments for
get_terms()
. - $request
-
(Required) Full details about the request.
Return Return
(array) List of term objects. (Total count in $this->total_terms
).
Source Source
File: includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller.php