From 17141cd4d81dc110ad981eaa15d7adba2c151d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Mon, 1 Apr 2019 10:09:53 +0200 Subject: [PATCH] Update Variations controller filter names (https://github.com/woocommerce/woocommerce-admin/pull/1949) --- ...s-wc-admin-rest-product-variations-controller.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-product-variations-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-product-variations-controller.php index c63464697f6..64b1fa06a5a 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-product-variations-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-product-variations-controller.php @@ -62,13 +62,13 @@ class WC_Admin_REST_Product_Variations_Controller extends WC_REST_Product_Variat * @return WP_Error|WP_REST_Response */ public function get_items( $request ) { - add_filter( 'posts_where', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_product_search_filter' ), 10, 2 ); - add_filter( 'posts_join', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_product_search_join' ), 10, 2 ); - add_filter( 'posts_groupby', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_product_search_group_by' ), 10, 2 ); + add_filter( 'posts_where', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_filter' ), 10, 2 ); + add_filter( 'posts_join', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_join' ), 10, 2 ); + add_filter( 'posts_groupby', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_group_by' ), 10, 2 ); $response = parent::get_items( $request ); - remove_filter( 'posts_where', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_product_search_filter' ), 10 ); - remove_filter( 'posts_join', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_product_search_join' ), 10 ); - remove_filter( 'posts_groupby', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_product_search_group_by' ), 10 ); + remove_filter( 'posts_where', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_filter' ), 10 ); + remove_filter( 'posts_join', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_join' ), 10 ); + remove_filter( 'posts_groupby', array( 'WC_Admin_REST_Products_Controller', 'add_wp_query_group_by' ), 10 ); return $response; } }