WC_Query::__construct() public WC 1.0
Constructor for the query class. Hooks in methods.
{} Это метод класса: WC_Query{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WC_Query = new WC_Query(); $WC_Query->__construct();
Код WC_Query::__construct() WC Query:: construct WC 5.0.0
public function __construct() {
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();
}