WordPress at Your Fingertips
function is not described

WC_Query::__construct() public WC 1.0

Constructor for the query class. Hooks in methods.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Query = new WC_Query();
$WC_Query->__construct();

Code of WC_Query::__construct() WC 5.6.0

public function __construct() {
	$this->filterer = wc_get_container()->get( Filterer::class );

	add_action( 'init', array( $this, 'add_endpoints' ) );
	if ( ! is_admin() ) {
		add_action( 'wp_loaded', array( $this, 'get_errors' ), 20 );
		add_filter( 'query_vars', array( $this, 'add_query_vars' ), 0 );
		add_action( 'parse_request', array( $this, 'parse_request' ), 0 );
		add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
		add_filter( 'get_pagenum_link', array( $this, 'remove_add_to_cart_pagination' ), 10, 1 );
	}
	$this->init_query_vars();
}