woocommerce_rest_{$taxonomy}_query

woocommerce_rest_{$taxonomy}_query

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_rest_{$taxonomy}_query') is found 1 times:

  • /includes/rest-api/Controllers/Version3/class-wc-rest-terms-controller.php line 323
    		 * @param array           $prepared_args Array of arguments to be
    		 *                                       passed to get_terms.
    		 * @param WP_REST_Request $request       The current request.
    		 */
    		$prepared_args = apply_filters( "woocommerce_rest_{$taxonomy}_query", $prepared_args, $request );
    
    		if ( ! empty( $prepared_args['product'] ) ) {
    			$query_result = $this->get_terms_for_product( $prepared_args, $request );
    			$total_terms  = $this->total_terms;
    		} else {
    			$query_result = get_terms( $taxonomy, $prepared_args );