Category_Protector implements Registerable, Service

This class protects categories (and their products) inside product loops, the main shop page, search results, widgets, navigation menus, and in WooCommerce shortcodes.

Tags
author

Barn2 Plugins info@barn2.co.uk

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().
Service
Marker interface to denote a service.

Table of Contents

$hidden_category_ids  : mixed
$unlocked_categories  : mixed
is_product_purchasable()  : mixed
protect_nav_menus()  : mixed
protect_product_categories()  : mixed
protect_products_in_loop()  : mixed
protect_products_in_shortcode()  : mixed
register()  : mixed
update_category_counts()  : mixed
build_tax_query()  : mixed
hidden_category_ids()  : mixed
unlocked_categories()  : mixed

Properties

Methods

is_product_purchasable()

public is_product_purchasable(mixed $purchasable, mixed $product) : mixed
Parameters
$purchasable : mixed
$product : mixed
Return values
mixed

protect_nav_menus()

public protect_nav_menus(mixed $menu_items, mixed $menu, mixed $args) : mixed
Parameters
$menu_items : mixed
$menu : mixed
$args : mixed
Return values
mixed

protect_product_categories()

public protect_product_categories(mixed $args, mixed $taxonomies) : mixed
Parameters
$args : mixed
$taxonomies : mixed
Return values
mixed

protect_products_in_loop()

public protect_products_in_loop(mixed $query) : mixed
Parameters
$query : mixed
Return values
mixed

protect_products_in_shortcode()

public protect_products_in_shortcode(mixed $query_args, mixed $atts[, mixed $loop_name = false ]) : mixed
Parameters
$query_args : mixed
$atts : mixed
$loop_name : mixed = false
Return values
mixed

update_category_counts()

public update_category_counts(mixed $terms, mixed $taxonomies, mixed $args) : mixed
Parameters
$terms : mixed
$taxonomies : mixed
$args : mixed
Return values
mixed

build_tax_query()

private build_tax_query(mixed $query_args) : mixed
Parameters
$query_args : mixed
Return values
mixed

hidden_category_ids()

private hidden_category_ids() : mixed
Return values
mixed

unlocked_categories()

private unlocked_categories() : mixed
Return values
mixed

Search results