Wholesale_Pro extends Plugin_Integration implements Registerable

Wholesale Pro Plugin Integration.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable

Table of Contents

$plugin_class  : string
The main plugin class to check for existence.
$plugin_function  : string
The main plugin function to check for existence.
hide_protected_choices()  : array<string|int, mixed>
Hide protected product choices from filter options.
hide_protected_products()  : array<string|int, mixed>
Hide protected products from the results.
plugin_is_enabled()  : bool
Check if the plugin is enabled.
register()  : void
Register the integration.
get_hidden_categories_ids()  : array<string|int, mixed>
Get the list of hidden categories ids.
get_hidden_products()  : array<string|int, mixed>
Get the list of products from the hidden categories.

Properties

$plugin_class

The main plugin class to check for existence.

protected string $plugin_class = ''

$plugin_function

The main plugin function to check for existence.

protected string $plugin_function = '\\Barn2\\Plugin\\WC_Wholesale_Pro\\woocommerce_wholesale_pro'

Methods

hide_protected_choices()

Hide protected product choices from filter options.

public hide_protected_choices(array<string|int, mixed> $choices, Query $query) : array<string|int, mixed>
Parameters
$choices : array<string|int, mixed>

The filter choices to filter.

$query : Query

The query object.

Return values
array<string|int, mixed>

The filtered choices.

hide_protected_products()

Hide protected products from the results.

public hide_protected_products(array<string|int, mixed> $products, Query $query) : array<string|int, mixed>
Parameters
$products : array<string|int, mixed>

The products to filter.

$query : Query

The query object.

Return values
array<string|int, mixed>

The filtered products.

plugin_is_enabled()

Check if the plugin is enabled.

public plugin_is_enabled() : bool
Return values
bool

register()

Register the integration.

public register() : void
Return values
void

get_hidden_categories_ids()

Get the list of hidden categories ids.

private get_hidden_categories_ids() : array<string|int, mixed>
Return values
array<string|int, mixed>

get_hidden_products()

Get the list of products from the hidden categories.

private get_hidden_products() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results