Hook_Manager extends WP_Scoped_Hooks
Responsible for managing the actions and filter hooks for an individual product table.
Hooks are registered in a temporary hook environment (@see class WP_Scoped_Hooks), and only apply while the data is loaded into the table.
Tags
Table of Contents
- $args : mixed
- $template_loader : mixed
- __construct() : mixed
- add_to_cart_form_action() : string
- Return a blank action for add to cart forms in the product table. This allows any non-AJAX actions to return back to the current page.
- add_to_cart_text() : mixed
- after_add_to_cart_button() : mixed
- before_add_to_cart_button() : mixed
- get_stock_html() : mixed
- loop_add_to_cart_args() : mixed
- register() : mixed
- remove_image_srcset() : mixed
- set_custom_audio_shortcode_class() : mixed
- set_custom_video_playlist_class() : mixed
- set_custom_video_shortcode_class() : mixed
- variations_dropdown_set_variation_image_props() : mixed
- variations_separate_remove_filtered() : array<string|int, mixed>
- When using separate variation rows with the layered nav widgets, we need to filter out variations which don't match the current search criteria.
- woocommerce_variable_add_to_cart() : mixed
- The add to cart template for variable products (when using dropdowns for variations).
- woocommerce_variation_add_to_cart() : mixed
- The add to cart template for variation products (when listing one variation per row).
Properties
$args
public
mixed
$args
$template_loader
private
mixed
$template_loader
Methods
__construct()
public
__construct(Table_Args $args) : mixed
Parameters
- $args : Table_Args
Return values
mixed —add_to_cart_form_action()
Return a blank action for add to cart forms in the product table. This allows any non-AJAX actions to return back to the current page.
public
add_to_cart_form_action(string $url) : string
Parameters
- $url : string
Return values
string —The URL
add_to_cart_text()
public
add_to_cart_text(mixed $text) : mixed
Parameters
- $text : mixed
Return values
mixed —after_add_to_cart_button()
public
after_add_to_cart_button() : mixed
Return values
mixed —before_add_to_cart_button()
public
before_add_to_cart_button() : mixed
Return values
mixed —get_stock_html()
public
get_stock_html(mixed $html[, mixed $product = false ]) : mixed
Parameters
- $html : mixed
- $product : mixed = false
Return values
mixed —loop_add_to_cart_args()
public
loop_add_to_cart_args(mixed $args) : mixed
Parameters
- $args : mixed
Return values
mixed —register()
public
register() : mixed
Return values
mixed —remove_image_srcset()
public
remove_image_srcset(mixed $attr) : mixed
Parameters
- $attr : mixed
Return values
mixed —set_custom_audio_shortcode_class()
public
set_custom_audio_shortcode_class(mixed $class) : mixed
Parameters
- $class : mixed
Return values
mixed —set_custom_video_playlist_class()
public
set_custom_video_playlist_class(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —set_custom_video_shortcode_class()
public
set_custom_video_shortcode_class(mixed $class) : mixed
Parameters
- $class : mixed
Return values
mixed —variations_dropdown_set_variation_image_props()
public
variations_dropdown_set_variation_image_props(mixed $variation_data, mixed $product, mixed $variation) : mixed
Parameters
- $variation_data : mixed
- $product : mixed
- $variation : mixed
Return values
mixed —variations_separate_remove_filtered()
When using separate variation rows with the layered nav widgets, we need to filter out variations which don't match the current search criteria.
public
variations_separate_remove_filtered(array<string|int, mixed> $child_ids[, WC_Product $product = false ][, bool $visible_only = false ]) : array<string|int, mixed>
Parameters
- $child_ids : array<string|int, mixed>
- $product : WC_Product = false
- $visible_only : bool = false
Return values
array<string|int, mixed> —woocommerce_variable_add_to_cart()
The add to cart template for variable products (when using dropdowns for variations).
public
woocommerce_variable_add_to_cart() : mixed
Tags
Return values
mixed —woocommerce_variation_add_to_cart()
The add to cart template for variation products (when listing one variation per row).
public
woocommerce_variation_add_to_cart() : mixed