WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Utils

BlocksWpQuery::__construct() public WC 1.0

Constructor.

Sets up the WordPress query, if parameter is not empty.

Unlike the constructor in WP_Query, this does not RUN the query.

{} It's a method of the class: BlocksWpQuery{}

No Hooks.

Return

null. Nothing.

Usage

$BlocksWpQuery = new BlocksWpQuery();
$BlocksWpQuery->__construct( $query );
$query(string|array)
URL query string or array of vars.
Default: ''

Code of BlocksWpQuery::__construct() WC 5.8.0

public function __construct( $query = '' ) {
	if ( ! empty( $query ) ) {
		$this->init();
		$this->query      = wp_parse_args( $query );
		$this->query_vars = $this->query;
		$this->parse_query_vars();
	}
}