'publish', 'type' => array( 'product', 'product_variation' ), ) ); } /** * Get products matching the current query vars. * @return array of WC_Product objects */ public function get_products() { $args = apply_filters( 'woocommerce_product_query_args', $this->get_query_vars() ); $results = array();//WC_Data_Store::load( 'product' )->query( $args ); return apply_filters( 'woocommerce_product_query', $results, $args ); } }