Hook_Manager
extends WP_Scoped_Hooks
in package
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
- $end_hook : mixed
- $hooks : mixed
- $start_hook : mixed
- __construct() : mixed
- add_action() : mixed
- add_filter() : 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.
- after_add_to_cart_button() : mixed
- before_add_to_cart_button() : mixed
- format_price_for_variable_products() : mixed
- get_stock_html() : mixed
- get_stock_html_legacy() : mixed
- load_product_addons_template() : mixed
- Load any custom templates for WooCommerce Product Addons. Templates are located under /templates/addons/
- loop_add_to_cart_args() : mixed
- product_addons_reset_display_hooks() : mixed
- product_addons_show_totals() : mixed
- register() : mixed
- remove_action() : mixed
- remove_filter() : mixed
- remove_image_srcset() : mixed
- reset() : mixed
- set_external_product_button_text() : mixed
- set_scope() : mixed
- simple_product_button_close_wrapper() : mixed
- simple_product_button_open_wrapper() : mixed
- variations_dropdown_set_variation_image_props() : mixed
- variations_separate_remove_filtered() : type
- 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_single_variation() : mixed
- woocommerce_variable_add_to_cart() : mixed
- The add to cart template for variable products.
- woocommerce_variation_add_to_cart() : mixed
- array_walk_add_filter() : mixed
- array_walk_remove_filter() : mixed
- initialize() : mixed
Properties
$args
public
mixed
$args
$end_hook
private
mixed
$end_hook
$hooks
private
mixed
$hooks
$start_hook
private
mixed
$start_hook
Methods
__construct()
public
__construct(Table_Args $args) : mixed
Parameters
- $args : Table_Args
Return values
mixed —add_action()
public
add_action(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —add_filter()
public
add_filter(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
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
static add_to_cart_form_action(string $url) : string
Parameters
- $url : string
Return values
string —The URL
after_add_to_cart_button()
public
static after_add_to_cart_button() : mixed
Return values
mixed —before_add_to_cart_button()
public
static before_add_to_cart_button() : mixed
Return values
mixed —format_price_for_variable_products()
public
static format_price_for_variable_products(mixed $price_html, mixed $product) : mixed
Parameters
- $price_html : mixed
- $product : 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 —get_stock_html_legacy()
public
get_stock_html_legacy(mixed $html[, mixed $availability = false ][, mixed $product = false ]) : mixed
Parameters
- $html : mixed
- $availability : mixed = false
- $product : mixed = false
Return values
mixed —load_product_addons_template()
Load any custom templates for WooCommerce Product Addons. Templates are located under /templates/addons/
public
static load_product_addons_template(mixed $located, mixed $template_name, mixed $args, mixed $template_path, mixed $default_path) : mixed
Parameters
- $located : mixed
- $template_name : mixed
- $args : mixed
- $template_path : mixed
- $default_path : mixed
Return values
mixed —loop_add_to_cart_args()
public
loop_add_to_cart_args(mixed $args) : mixed
Parameters
- $args : mixed
Return values
mixed —product_addons_reset_display_hooks()
public
static product_addons_reset_display_hooks() : mixed
Return values
mixed —product_addons_show_totals()
public
static product_addons_show_totals() : mixed
Return values
mixed —register()
public
register() : mixed
Return values
mixed —remove_action()
public
remove_action(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —remove_filter()
public
remove_filter(mixed $tag, mixed $function[, mixed $priority = 10 ][, mixed $accepted_args = 1 ]) : mixed
Parameters
- $tag : mixed
- $function : mixed
- $priority : mixed = 10
- $accepted_args : mixed = 1
Return values
mixed —remove_image_srcset()
public
remove_image_srcset(mixed $attr) : mixed
Parameters
- $attr : mixed
Return values
mixed —reset()
public
reset() : mixed
Return values
mixed —set_external_product_button_text()
public
static set_external_product_button_text(mixed $button_text, mixed $product) : mixed
Parameters
- $button_text : mixed
- $product : mixed
Return values
mixed —set_scope()
public
set_scope(mixed $start_hook, mixed $end_hook) : mixed
Parameters
- $start_hook : mixed
- $end_hook : mixed
Return values
mixed —simple_product_button_close_wrapper()
public
static simple_product_button_close_wrapper() : mixed
Return values
mixed —simple_product_button_open_wrapper()
public
static simple_product_button_open_wrapper() : 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
static variations_separate_remove_filtered(type $child_ids[, type $product = false ][, type $visible_only = false ]) : type
Parameters
- $child_ids : type
- $product : type = false
- $visible_only : type = false
Return values
type —woocommerce_single_variation()
public
static woocommerce_single_variation() : mixed
Return values
mixed —woocommerce_variable_add_to_cart()
The add to cart template for variable products.
public
static woocommerce_variable_add_to_cart() : mixed
Tags
Return values
mixed —woocommerce_variation_add_to_cart()
public
static woocommerce_variation_add_to_cart() : mixed
Return values
mixed —array_walk_add_filter()
private
array_walk_add_filter(mixed $hook) : mixed
Parameters
- $hook : mixed
Return values
mixed —array_walk_remove_filter()
private
array_walk_remove_filter(mixed $hook) : mixed
Parameters
- $hook : mixed
Return values
mixed —initialize()
private
initialize() : mixed