WC_Product_Query::get_products()

Get products matching the current query vars.


Description Description


Return Return

(array|object) of WC_Product objects


Top ↑

Source Source

File: includes/class-wc-product-query.php

	public function get_products() {
		$args    = apply_filters( 'woocommerce_product_object_query_args', $this->get_query_vars() );
		$results = WC_Data_Store::load( 'product' )->query( $args );
		return apply_filters( 'woocommerce_product_object_query', $results, $args );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.