WCBoost 1.1.2 has 14 actions and 40 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when WCBoost fires an action
add_action( 'wcboost_products_compare_after_compare_table', function( $compare_items ) {
// Your code runs here.
}, 10, 1 );
// Change a value WCBoost is about to use
add_filter( 'wcboost_products_compare_persistent_enabled', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
apply_filters( 'wcboost_products_compare_persistent_enabled', true ); -
apply_filters( 'wcboost_products_compare_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ); -
apply_filters( 'wcboost_products_compares_add_to_list_redirect', $url, $adding_product ); -
apply_filters( 'wc_product_enable_dimensions_display', true ); -
apply_filters( 'wcboost_products_compare_add_to_compare_fragments', $data ); -
apply_filters( 'wcboost_products_compare_add_to_compare_url', $url, $product ); -
do_action( 'wcboost_products_compare_after_compare_table', $compare_items ); -
do_action( 'wcboost_products_compare_after_content', $compare_list, $args ); -
apply_filters( 'wcboost_products_compare_ajax_timeout', 5000 ); -
apply_filters( 'wcboost_products_compare_attribute_field', $product->get_attribute( $field ), $field, $product ); -
do_action( 'wcboost_products_compare_before_compare_table', $compare_items ); -
do_action( 'wcboost_products_compare_before_content', $compare_list, $args ); -
apply_filters( "wcboost_products_compare_button_{$type}_text", $text ); -
apply_filters( 'wcboost_products_compare_button_icon', $svg, $icon ); -
apply_filters( 'wcboost_products_compare_button_template_args', $args, $product ); -
apply_filters( 'wcboost_products_compare_button_uses_ajax', true ); -
apply_filters( 'wcboost_products_compare_clear_link', sprintf( '<a href="%s" class="%s" rel="nofollow">%s</a>', esc_url( Helper::get_clear_url() ), esc_attr( implode( ' ', $args['class'] ) ), esc_html__( 'Clear list', 'wcboost-products-compare' ) ) ); -
apply_filters( 'wcboost_products_compare_clear_link_args', $args ); -
apply_filters( 'wcboost_products_compare_clear_url', $url ); -
do_action( 'wcboost_products_compare_content', $compare_list, $args ); -
apply_filters( 'wcboost_products_compare_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) ); -
do_action( 'wcboost_products_compare_custom_field', $field, $product, $args ); -
apply_filters( 'wcboost_products_compare_empty_message', __( 'There is no product to compare.', 'wcboost-products-compare' ) ); -
do_action( 'wcboost_products_compare_field_content', $field, $_product, $item_key ); -
apply_filters( 'wcboost_products_compare_field_label', $field_name, $field ); -
apply_filters( 'wcboost_products_compare_fields', $compare_fields ); -
apply_filters( 'wcboost_products_compare_fragments_params', [ 'refresh_on_load' => get_option( 'wcboost_products_compare_ajax_bypass_cache', 'no' ), 'hash_key' => 'wcboost_compare_hash_' . $hash, 'fragment_name' => 'wcboost_compare_fragments_' . $hash, 'list_name' => 'wcboost_compare_' . $hash, 'timeout' => apply_filters( 'wcboost_products_compare_ajax_timeout', 5000 ), ] ); -
apply_filters( 'wcboost_products_compare_hash', $hash, $this ); -
do_action( 'wcboost_products_compare_installed' ); -
apply_filters( 'wcboost_products_compare_item_key', md5( $product_id ) ); -
apply_filters( 'wcboost_products_compare_item_remove_link', sprintf( '<a href="%s" class="remove wcboost-products-compare-remove" aria-label="%s" rel="nofollow">×</a>', esc_url( \WCBoost\ProductsCompare\Helper::get_remove_url( $product ) ), esc_html__( 'Remove this item', 'wcboost-products-compare' ) ), $args['key'] ); -
apply_filters( 'wcboost_products_compare_layout', 'table' ); -
do_action( 'wcboost_products_compare_list_emptied', $reset_db, $this ); -
apply_filters( 'wcboost_products_compare_loop_add_to_compare_link', sprintf( '<a href="%s" class="%s" role="button" %s> %s <span class="wcboost-products-compare-button__text">%s</span> </a>', esc_url( isset( $args['url'] ) ? $args['url'] : add_query_arg( [ 'add-to-compare' => $product->get_id() ] ) ), esc_attr( isset( $args['class'] ) ? $args['class'] : 'wcboost-products-compare-button wcboost-products-compare-button--loop button' ), isset( $args['attributes'] ... ); -
apply_filters( 'wcboost_products_compare_open_link', sprintf( '<a href="%s" class="%s" rel="nofollow">%s</a>', esc_url( wc_get_page_permalink( 'compare' ) ), esc_attr( implode( ' ', $args['class'] ) ), esc_html__( 'Compare now', 'wcboost-products-compare' ) ) ); -
apply_filters( 'wcboost_products_compare_open_link_args', $args ); -
apply_filters( 'wcboost_products_compare_page_id_option_exclude', [ wc_get_page_id( 'checkout' ), wc_get_page_id( 'myaccount' ), wc_get_page_id( 'cart' ), ] ); -
apply_filters( 'wcboost_products_compare_params', [ 'page_url' => apply_filters( 'wcboost_products_compares_add_to_list_redirect', wc_get_page_permalink( 'compare' ), null ), 'added_behavior' => get_option( 'wcboost_products_compare_added_behavior' ), 'exists_item_behavior' => get_option( 'wcboost_products_compare_exists_item_button_behaviour', 'remove' ), 'icon_normal' => Helper::get_compare_icon( false ), 'icon_checked' => Helper::get_compar... ); -
apply_filters( 'wcboost_products_compare_popup_title', __( 'Compare products', 'wcboost-products-compare' ) ); -
do_action( 'wcboost_products_compare_product_added', $product_id, $this ); -
do_action( 'wcboost_products_compare_product_removed', $product_id, $this ); -
apply_filters( 'wcboost_products_compare_remove_from_compare_url', $url, $product ); -
apply_filters( 'wcboost_products_compare_return_to_shop_link', sprintf( '<a href="%s" class="button wc-backward">%s</a>', esc_url( $return_url ), esc_html__( 'Return to shop', 'wcboost-products-compare' ) ), $args ); -
apply_filters( 'wcboost_products_compare_shortcode_button_html', $html, $atts ); -
apply_filters( 'wcboost_products_compare_single_add_to_compare_link', sprintf( '<a href="%s" class="%s" role="button" %s> %s <span class="wcboost-products-compare-button__text">%s</span> </a>', esc_url( isset( $args['url'] ) ? $args['url'] : add_query_arg( [ 'add-to-compare' => $product->get_id() ] ) ), esc_attr( isset( $args['class'] ) ? $args['class'] : 'wcboost-products-compare-button wcboost-products-compare-button--single button' ), isset( $args['attributes'... ); -
apply_filters( 'wcboost_products_compare_svg_icon', $svg, $icon ); -
apply_filters( 'wcboost_products_compare_template_args', $args, $list ); -
do_action( 'wcboost_products_compare_widget_after_contents' ); -
do_action( 'wcboost_products_compare_widget_before_contents' ); -
do_action( 'wcboost_products_compare_widget_buttons' ); -
widget_title
filterapply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ); -
apply_filters( 'woocommerce_coming_soon_exclude', false ); -
wpml_object_id
filterapply_filters( 'wpml_object_id', $page_id, 'page', false, null );
Generated from WCBoost's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: