Product_Category_Widget
Class Product_Category_Widget
A widget to display a list or dropdown of product categories
- Full name:
\BigCommerce\Widgets\Product_Category_Widget - Parent class:
WP_Widget
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
NAME | public | ’bigcommerce_product_categories’ |
Methods
__construct
Sets up a new Product Categories widget instance.
public __construct(): mixedwidget
Outputs the content for the current Product Categories widget instance.
public widget(array $args, array $instance): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$args | array | Display arguments including ‘before_title’, ‘after_title’, ‘before_widget’, and ‘after_widget’. |
$instance | array | Settings for the current Categories widget instance. |
category_dropdown
protected category_dropdown(mixed $title, mixed $args, mixed $instance): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$title | mixed | |
$args | mixed | |
$instance | mixed |
dropdown_js
protected dropdown_js(mixed $dropdown_id): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$dropdown_id | mixed |
category_list
protected category_list(mixed $args, mixed $instance): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$args | mixed | |
$instance | mixed |
update
Handles updating settings for the current Product Categories widget instance.
public update(array $new_instance, array $old_instance): arrayParameters:
| Parameter | Type | Description |
|---|---|---|
$new_instance | array | New settings for this instance as input by the user via WP_Widget::form(). |
$old_instance | array | Old settings for this instance. |
Return Value:
Updated settings to save.
form
Outputs the settings form for the Product Categories widget.
public form(array $instance): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$instance | array | Current settings. |
Automatically generated on 2025-01-21