Mini_Cart_Widget
Class Product_Category_Widget
A widget to display a list or dropdown of product categories
- Full name:
\BigCommerce\Widgets\Mini_Cart_Widget - Parent class:
WP_Widget
Constants
| Constant | Visibility | Type | Value |
|---|---|---|---|
NAME | public | ’bigcommerce_mini_cart’ |
Methods
__construct
Sets up a new Product Categories widget instance.
public __construct(): mixedwidget
Outputs the content for the current Mini Cart 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 widget instance. |
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