Add filters

This commit is contained in:
claudiulodro 2017-04-26 11:19:54 -07:00
parent 2fad12221d
commit 1647e253a0
2 changed files with 4 additions and 2 deletions

View File

@ -75,6 +75,8 @@ class WC_Order_Query extends WC_Object_Query {
* @return array of WC_Order objects * @return array of WC_Order objects
*/ */
public function get_orders() { public function get_orders() {
return WC_Data_Store::load( 'order' )->query( $this->query_vars ); $args = apply_filters( 'woocommerce_order_query_args', $this->query_vars );
$results = WC_Data_Store::load( 'order' )->query( $this->query_vars );
return apply_filters( 'woocommerce_order_query', $results, $args );
} }
} }

View File

@ -251,6 +251,6 @@ class WC_Data_Store_WP {
} }
} }
return $wp_query_args; return apply_filters( 'woocommerce_get_wp_query_args', $wp_query_args, $query_vars );
} }
} }