Variation_Dropdowns implements Service, Registerable, Conditional

Handles the display of the Variations Dropdown on shop and category pages.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Service
Registerable
Conditional

Table of Contents

$settings  : mixed
__construct()  : mixed
Constructor - set the plugin settings
add_category_page_variation_dropdowns_field_hooks()  : mixed
Add quantity fields to the product category page
add_products_class()  : array<string|int, mixed>
Add class to the product posts loop in shop and category pages
add_shop_page_variation_dropdowns_hooks()  : mixed
Add quantity fields to the shop page
ajax_variable_cart()  : void
Handle AJAX request to add variable product to the cart
category_page_variation_dropdowns_enabled()  : mixed
Check if the variation dropdowns are enabled on the category page
is_required()  : bool
Check if it's required to load
products_loop_class_hooks()  : mixed
Add hook to the products look class hook
register()  : mixed
Register necessary hooks
remove_select_options_button()  : string
Remove the select options button from shop page for variable products when variation dropdowns are enabled
shop_page_variation_dropdowns_field_enabled()  : mixed
Check if the variation dropdowns are enabled on the shop page
should_display_variation_dropdowns()  : mixed
Determint should display quantity field for specific product
show_variation_dropdowns()  : mixed
Display quantity fields to respective locations
variation_dropdowns()  : mixed
Variations Dropdown
wbv_print_variation_table()  : void
WC Bulk Variation Prodouct Grid
wbv_product_grid_enabled()  : bool
WC Bulk Variation Prodouct Grid Enabled

Properties

Methods

__construct()

Constructor - set the plugin settings

public __construct(object $plugin) : mixed
Parameters
$plugin : object

The main plugin object

Return values
mixed

add_category_page_variation_dropdowns_field_hooks()

Add quantity fields to the product category page

public add_category_page_variation_dropdowns_field_hooks() : mixed
Return values
mixed

add_products_class()

Add class to the product posts loop in shop and category pages

public add_products_class(array<string|int, mixed> $classes, string $class, int $product_id) : array<string|int, mixed>
Parameters
$classes : array<string|int, mixed>
$class : string
$product_id : int
Return values
array<string|int, mixed>

$classes

add_shop_page_variation_dropdowns_hooks()

Add quantity fields to the shop page

public add_shop_page_variation_dropdowns_hooks() : mixed
Return values
mixed

ajax_variable_cart()

Handle AJAX request to add variable product to the cart

public ajax_variable_cart() : void
Return values
void

category_page_variation_dropdowns_enabled()

Check if the variation dropdowns are enabled on the category page

public category_page_variation_dropdowns_enabled() : mixed
Return values
mixed

is_required()

Check if it's required to load

public is_required() : bool
Return values
bool

products_loop_class_hooks()

Add hook to the products look class hook

public products_loop_class_hooks() : mixed
Return values
mixed

register()

Register necessary hooks

public register() : mixed
Return values
mixed

remove_select_options_button()

Remove the select options button from shop page for variable products when variation dropdowns are enabled

public remove_select_options_button(array<string|int, mixed> $printf, object $product) : string
Parameters
$printf : array<string|int, mixed>
$product : object
Return values
string

$printf

shop_page_variation_dropdowns_field_enabled()

Check if the variation dropdowns are enabled on the shop page

public shop_page_variation_dropdowns_field_enabled() : mixed
Return values
mixed

should_display_variation_dropdowns()

Determint should display quantity field for specific product

public should_display_variation_dropdowns(object $product) : mixed
Parameters
$product : object
Return values
mixed

show_variation_dropdowns()

Display quantity fields to respective locations

public show_variation_dropdowns() : mixed
Return values
mixed

variation_dropdowns()

Variations Dropdown

public variation_dropdowns() : mixed

This function runs on AJAX request and outputs variations dropdown for products

Return values
mixed

wbv_print_variation_table()

WC Bulk Variation Prodouct Grid

public static wbv_print_variation_table() : void

print WC Bulk Variation product grid

Return values
void

wbv_product_grid_enabled()

WC Bulk Variation Prodouct Grid Enabled

public static wbv_product_grid_enabled() : bool

Check if the product has bulk variation grid enabled

Return values
bool

Search results