WPC Smart Compare for WooCommerce 6.7.1 has 4 actions and 83 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 WPC Smart Compare for WooCommerce fires an action
add_action( 'woosc_after_quick_table', function( $product ) {
// Your code runs here.
}, 10, 1 );
// Change a value WPC Smart Compare for WooCommerce is about to use
add_filter( 'wpc_admin_nav_items', function( $nav_items, $active_page ) {
// Change $nav_items here.
return $nav_items;
}, 10, 2 );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
-
woosc_product_name
filterapply_filters( 'woosc_product_name', $product_obj->get_name() ); -
woosc_product_image
filterapply_filters( 'woosc_product_image', '<a ' . ( $link === 'yes_popup' ? 'class="woosq-link" data-id="' . $product_id . '" data-context="woosc"' : '' ) . ' href="' . $product_obj->get_permalink() . '" draggable="false" ' . ( $link === 'yes_blank' ? 'target="_blank"' : '' ) . '>' . $product_image . '</a>', $product_obj ); -
woosc_product_visible
filterapply_filters( 'woosc_product_visible', $product_obj->is_visible(), $product_obj, 'bar' ); -
woosc_disable_nonce_check
filterapply_filters( 'woosc_disable_nonce_check', false, 'search' ); -
woosc_bar_bg_color_default
filterapply_filters( 'woosc_bar_bg_color_default', '#292a30' ); -
woosc_bar_btn_color_default
filterapply_filters( 'woosc_bar_btn_color_default', '#00a0d2' ); -
woosc_button_normal_icon
filterapply_filters( 'woosc_button_normal_icon', self::get_setting( 'button_normal_icon', 'woosc-icon-1' ) ); -
apply_filters( 'woosc_button_position_archive', self::get_setting( 'button_archive', apply_filters( 'woosc_button_position_archive_default', 'after_add_to_cart' ) ) ); -
apply_filters( 'woosc_button_position_archive_default', 'after_add_to_cart' ); -
woosc_button_position_single
filterapply_filters( 'woosc_button_position_single', self::get_setting( 'button_single', apply_filters( 'woosc_button_position_single_default', '31' ) ) ); -
apply_filters( 'woosc_button_position_single_default', '31' ); -
woosc_get_table
filterapply_filters( 'woosc_get_table', $table ); -
woosc_after_quick_table
actiondo_action( 'woosc_after_quick_table', $product ); -
do_action( 'woosc_after_quick_table_products', $product ); -
woosc_area_class
filterapply_filters( 'woosc_area_class', $class ); -
woosc_bar_bg_color
filterapply_filters( 'woosc_bar_bg_color', self::get_setting( 'bar_bg_color', $bar_bg_color_default ) ); -
woosc_bar_btn_color
filterapply_filters( 'woosc_bar_btn_color', self::get_setting( 'bar_btn_color', $bar_btn_color_default ) ); -
woosc_bar_btn_text
filterapply_filters( 'woosc_bar_btn_text', self::localization( 'bar_button', esc_html__( 'Compare', 'woo-smart-compare' ) ) ); -
woosc_bar_product_class
filterapply_filters( 'woosc_bar_product_class', $product_class, $product_obj ); -
woosc_before_quick_table
actiondo_action( 'woosc_before_quick_table', $product ); -
do_action( 'woosc_before_quick_table_products', $product ); -
woosc_button_added_icon
filterapply_filters( 'woosc_button_added_icon', self::get_setting( 'button_added_icon', 'woosc-icon-74' ) ); -
woosc_button_attrs
filterapply_filters( 'woosc_button_attrs', [ 'text' => esc_html( $text ), 'text_added' => esc_html( $text_added ), 'id' => absint( $attrs['id'] ), 'product_id' => absint( $attrs['id'] ), 'product_name' => esc_html( $product_name ), 'product_image' => esc_url( $product_image ), ], $attrs ); -
woosc_button_class
filterapply_filters( 'woosc_button_class', $button_class, $attrs ); -
woosc_button_html
filterapply_filters( 'woosc_button_html', $output, $attrs['id'] ); -
apply_filters( 'woosc_button_positions_archive', [ 'before_title' => esc_html__( 'Above title', 'woo-smart-compare' ), 'after_title' => esc_html__( 'Under title', 'woo-smart-compare' ), 'after_rating' => esc_html__( 'Under rating', 'woo-smart-compare' ), 'after_price' => esc_html__( 'Under price', 'woo-smart-compare' ), 'before_add_to_cart' => esc_html__( 'Above add to cart button', 'woo-smart-compare' ), 'after_add_to_cart' => esc_html__( 'U... ); -
apply_filters( 'woosc_button_positions_single', [ '6' => esc_html__( 'Under title', 'woo-smart-compare' ), '11' => esc_html__( 'Under rating', 'woo-smart-compare' ), '21' => esc_html__( 'Under excerpt', 'woo-smart-compare' ), '29' => esc_html__( 'Above add to cart button', 'woo-smart-compare' ), '31' => esc_html__( 'Under add to cart button', 'woo-smart-compare' ), '41' => esc_html__( 'Under meta', 'woo-smart-compare' ), '51' => esc_html__( ... ); -
woosc_button_rel
filterapply_filters( 'woosc_button_rel', 'nofollow' ); -
woosc_button_text
filterapply_filters( 'woosc_button_text', self::localization( 'button', esc_html__( 'Compare', 'woo-smart-compare' ) ) ); -
woosc_button_text_added
filterapply_filters( 'woosc_button_text_added', self::localization( 'button_added', esc_html__( 'Compare', 'woo-smart-compare' ) ) ); -
woosc_disable_security_check
filterapply_filters( 'woosc_disable_security_check', $check, $context ); -
woosc_field_value
filterapply_filters( 'woosc_field_value', $field_value, $field_key, $product_id, $product_data ); -
woosc_fields
filterapply_filters( 'woosc_fields', [ 'image' => self::localization( 'field_image', esc_html__( 'Image', 'woo-smart-compare' ) ), 'sku' => self::localization( 'field_sku', esc_html__( 'SKU', 'woo-smart-compare' ) ), 'rating' => self::localization( 'field_rating', esc_html__( 'Rating', 'woo-smart-compare' ) ), 'price' => self::localization( 'field_price', esc_html__( 'Price', 'woo-smart-compare' ) ), 'stock' => self::localization(... ); -
woosc_generate_key
filterapply_filters( 'woosc_generate_key', $key ); -
woosc_get_bar
filterapply_filters( 'woosc_get_bar', $bar ); -
woosc_get_count
filterapply_filters( 'woosc_get_count', count( $products ) ); -
woosc_get_fields
filterapply_filters( 'woosc_get_fields', $saved_fields6, $context ); -
woosc_get_filter
filterapply_filters( 'woosc_get_filter', $select ); -
woosc_get_page_url
filterapply_filters( 'woosc_get_page_url', esc_url( $page_url ) ); -
woosc_get_products
filterapply_filters( 'woosc_get_products', $products, $type ); -
woosc_get_setting
filterapply_filters( 'woosc_get_setting', $setting, $name, $default ); -
woosc_get_settings
filterapply_filters( 'woosc_get_settings', self::$settings ); -
woosc_get_sidebar
filterapply_filters( 'woosc_get_sidebar', $sidebar ); -
apply_filters( 'woosc_get_table_minimum_columns', 3, $products_data ); -
apply_filters( 'woosc_get_table_unauthenticated', $table ); -
woosc_get_user_key
filterapply_filters( 'woosc_get_user_key', md5( 'woosc' . $user_id ), $user_id ); -
woosc_hide_empty_row
filterapply_filters( 'woosc_hide_empty_row', 'yes' ); -
woosc_is_protected
filterapply_filters( 'woosc_is_protected', $is_protected, $product ); -
woosc_key_characters
filterapply_filters( 'woosc_key_characters', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ); -
woosc_key_length
filterapply_filters( 'woosc_key_length', $length ); -
woosc_link_html
filterapply_filters( 'woosc_link_html', $output ); -
woosc_localization_{$key}
filterapply_filters( "woosc_localization_{$key}", $str ); -
apply_filters( 'woosc_myaccount_compare_content', do_shortcode( '[woosc_list]' ) ); -
apply_filters( 'woosc_myaccount_compare_label', esc_html__( 'Compare', 'woo-smart-compare' ) ); -
woosc_page_product_link
filterapply_filters( 'woosc_page_product_link', self::get_setting( 'link', 'yes' ) ); -
woosc_page_product_remove
filterapply_filters( 'woosc_page_product_remove', self::get_setting( 'remove', 'yes' ) === 'yes' ); -
woosc_page_remove_all
filterapply_filters( 'woosc_page_remove_all', self::get_setting( 'bar_remove', 'no' ) === 'yes' ); -
woosc_print_above_name
filterapply_filters( 'woosc_print_above_name', '' ); -
woosc_print_below_name
filterapply_filters( 'woosc_print_below_name', '' ); -
woosc_product_add_to_cart
filterapply_filters( 'woosc_product_add_to_cart', do_shortcode( '[add_to_cart style="" show_price="false" id="' . $product_id . '"]' ), $product_obj ); -
woosc_product_additional
filterapply_filters( 'woosc_product_additional', $additional, $product_obj ); -
woosc_product_availability
filterapply_filters( 'woosc_product_availability', $product_availability['availability'], $product_obj ); -
woosc_product_content
filterapply_filters( 'woosc_product_content', do_shortcode( $content ), $product_obj ); -
woosc_product_description
filterapply_filters( 'woosc_product_description', $description, $product_obj ); -
woosc_product_dimensions
filterapply_filters( 'woosc_product_dimensions', wc_format_dimensions( $product_obj->get_dimensions( false ) ), $product_obj ); -
woosc_product_filter
filterapply_filters( 'woosc_product_filter', $product_filter, $product_obj ); -
woosc_product_price
filterapply_filters( 'woosc_product_price', $product_obj->get_price_html(), $product_obj ); -
woosc_product_rating
filterapply_filters( 'woosc_product_rating', wc_get_rating_html( $product_obj->get_average_rating() ), $product_obj ); -
woosc_product_sc_{$key}
filterapply_filters( "woosc_product_sc_{$key}", do_shortcode( str_replace( '{product_id}', $product_id, $field_name ) ), $product_obj ); -
woosc_product_sku
filterapply_filters( 'woosc_product_sku', $product_obj->get_sku(), $product_obj ); -
woosc_product_stock
filterapply_filters( 'woosc_product_stock', wc_get_stock_html( $product_obj ), $product_obj ); -
woosc_product_weight
filterapply_filters( 'woosc_product_weight', wc_format_weight( $product_obj->get_weight() ), $product_obj ); -
woosc_quick_table_class
filterapply_filters( 'woosc_quick_table_class', $quick_table_class ); -
woosc_quick_table_fixed
filterapply_filters( 'woosc_quick_table_fixed', json_encode( apply_filters( 'woosc_quick_table_fixed_arr', [ 'pc' => 2, 'ta' => 1, 'mo' => 0, ] ) ) ); -
woosc_quick_table_fixed_arr
filterapply_filters( 'woosc_quick_table_fixed_arr', [ 'pc' => 2, 'ta' => 1, 'mo' => 0, ] ); -
woosc_quick_table_heading
filterapply_filters( 'woosc_quick_table_heading', '<h2>' . self::localization( 'quick_table_heading', esc_html__( 'Quick Comparison', 'woo-smart-compare' ) ) . '</h2>' ); -
woosc_quick_table_limit
filterapply_filters( 'woosc_quick_table_limit', 5 ); -
woosc_search_args
filterapply_filters( 'woosc_search_args', $args ); -
apply_filters( 'woosc_search_default_products', array_unique( $related ), $products ); -
woosc_search_exclude
filterapply_filters( 'woosc_search_exclude', false, $pr, $products ); -
woosc_vars
filterapply_filters( 'woosc_vars', [ 'wc_ajax_url' => WC_AJAX::get_endpoint( '%%endpoint%%' ), 'nonce' => wp_create_nonce( 'woosc-security' ), 'hash' => self::get_setting( 'hash', '6' ), 'user_id' => self::get_user_key(), 'page_url' => self::get_page_url(), 'open_button' => esc_attr( self::get_setting( 'open_button', '' ) ), 'hide_empty_row' => apply_filters( 'woosc_hide_empty_row', 'yes' ), 'reload_count' => self::get_setting( ... );
Generated from WPC Smart Compare for WooCommerce'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: