From 9b60e0543fdf0813f81c674e98240bc9a433f70e Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 25 Jul 2016 13:12:37 +0100 Subject: [PATCH] Allow meta_key/value in rest api filter @claudiosmweb Closes #11518 --- includes/abstracts/abstract-wc-rest-posts-controller.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/abstracts/abstract-wc-rest-posts-controller.php b/includes/abstracts/abstract-wc-rest-posts-controller.php index f147e3d596b..7cd58da1695 100644 --- a/includes/abstracts/abstract-wc-rest-posts-controller.php +++ b/includes/abstracts/abstract-wc-rest-posts-controller.php @@ -574,6 +574,10 @@ abstract class WC_REST_Posts_Controller extends WC_REST_Controller { 'posts_per_page', 'meta_query', 'tax_query', + 'meta_key', + 'meta_value', + 'meta_compare', + 'meta_value_num', ); $valid_vars = array_merge( $valid_vars, $rest_valid );