\WC_Product_Table_Widget_Layered_Nav

Product Table implementation of WooCommerce Layered Navigation Widget.

Based on version 2.6.0 of the WC_Widget_Layered_Nav class.

Summary

Methods
Properties
Constants
__construct()
body_class()
is_table_on_page()
unescape_commas()
update()
form()
init_settings()
widget()
No public properties found
No constants found
get_main_tax_query()
get_main_meta_query()
get_current_taxonomy()
get_current_term_id()
get_current_term_slug()
layered_nav_dropdown()
get_filtered_term_product_counts()
layered_nav_list()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct()

Constructor.

body_class()

body_class(  $classes)

Parameters

$classes

is_table_on_page()

is_table_on_page()

unescape_commas()

unescape_commas(  $link)

Parameters

$link

update()

update(array  $new_instance,array  $old_instance): array

Updates a particular instance of a widget.

Parameters

array $new_instance
array $old_instance

Returns

array

form()

form(array  $instance)

Outputs the settings update form.

Parameters

array $instance

init_settings()

init_settings()

Init settings after post types are registered.

widget()

widget(array  $args,array  $instance)

Output widget.

Parameters

array $args
array $instance

get_main_tax_query()

get_main_tax_query()

get_main_meta_query()

get_main_meta_query()

get_current_taxonomy()

get_current_taxonomy(): string

Return the currently viewed taxonomy name.

Returns

string

get_current_term_id()

get_current_term_id(): integer

Return the currently viewed term ID.

Returns

integer

get_current_term_slug()

get_current_term_slug(): integer

Return the currently viewed term slug.

Returns

integer

layered_nav_dropdown()

layered_nav_dropdown(array  $terms,string  $taxonomy,string  $query_type): boolean

Show dropdown layered nav.

Parameters

array $terms
string $taxonomy
string $query_type

Returns

boolean —

Will nav display?

get_filtered_term_product_counts()

get_filtered_term_product_counts(array  $term_ids,string  $taxonomy,string  $query_type): array

Count products within certain terms, taking the main WP query into consideration.

Parameters

array $term_ids
string $taxonomy
string $query_type

Returns

array

layered_nav_list()

layered_nav_list(array  $terms,string  $taxonomy,string  $query_type): boolean

Show list based layered nav.

Parameters

array $terms
string $taxonomy
string $query_type

Returns

boolean —

Will nav display?