WC_Query::__construct()
Constructor for the query class. Hooks in methods.
Method of the class: WC_Query{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Query = new WC_Query(); $WC_Query->__construct();
WC_Query::__construct() WC Query:: construct code WC 8.7.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(); }