Method |
Description |
|
__construct ( ) |
Constructor for the query class. Hooks in methods. |
|
add_endpoints ( ) |
Add endpoints for query vars. |
|
add_query_vars ( array $vars ) : array |
Add query vars. |
|
get_catalog_ordering_args ( $orderby = '', $order = '' ) : array |
Returns an array of arguments for ordering products based on the selected values. |
|
get_current_endpoint ( ) : string |
Get query current active query var. |
|
get_endpoint_title ( $endpoint ) : string |
Get page title for an endpoint. |
|
get_errors ( ) |
Get any errors from querystring. |
|
get_layered_nav_chosen_attributes ( ) |
Layered Nav Init. |
|
get_main_meta_query ( ) : array |
Get the meta query which was used by the main query. |
|
get_main_search_query_sql ( ) |
Based on WP_Query::parse_search |
|
get_main_tax_query ( ) : array |
Get the tax query which was used by the main query. |
|
get_meta_query ( array $meta_query = [] ) : array |
Appends meta queries to an array. |
|
get_products_in_view ( ) |
Get an unpaginated list all product ID's (both filtered and unfiltered). Makes use of transients. |
|
get_query_vars ( ) : array |
Get query vars. |
|
get_tax_query ( array $tax_query = [] ) : array |
Appends tax queries to an array. |
|
init_query_vars ( ) |
Init query vars by loading options. |
|
layered_nav_init ( ) |
|
|
layered_nav_query ( $filtered_posts ) |
Layered Nav post filter. |
|
order_by_popularity_post_clauses ( array $args ) : array |
WP Core doens't let us change the sort direction for invidual orderby params - https://core.trac.wordpress.org/ticket/17065. |
|
order_by_rating_post_clauses ( array $args ) : array |
Order by rating post clauses. |
|
parse_request ( ) |
Parse the request and look for query vars - endpoints may not be supported. |
|
pre_get_posts ( mixed $q ) |
Hook into pre_get_posts to do the main product query. |
|
product_query ( mixed $q ) |
Query the products, applying sorting/ordering etc. This applies to the main wordpress loop. |
|
rating_filter_meta_query ( ) : array |
Return a meta query for filtering by rating. |
|
remove_ordering_args ( ) |
Remove ordering queries. |
|
remove_posts_where ( ) |
Remove the posts_where filter. |
|
remove_product_query ( ) |
Remove the query. |
|
search_post_excerpt ( string $where = '' ) : string |
Search post excerpt. |
|
stock_status_meta_query ( string $status = 'instock' ) : array |
Returns a meta query to handle product stock status. |
|
visibility_meta_query ( string $compare = 'IN' ) : array |
Returns a meta query to handle product visibility. |
|
wpseo_metadesc ( ) : string |
WP SEO meta description. |
|
wpseo_metakey ( ) : string |
WP SEO meta key. |
|