WPC Smart Compare for WooCommerce icon
eCommerce & WooCommerce

WPC Smart Compare for WooCommerce hooks reference

  • By WPClever
  • v6.7.1 New
  • Updated

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.

functions.phpyour child theme
// 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

  • includes/wpc-core/class-wpc-dashboard.php line 66
    /**
     * Filter the WPClever admin nav items.
     */
    apply_filters( 'wpc_admin_nav_items', $nav_items, $active_page );
  • wpc-smart-compare.php line 2212 · used in 7 places
    apply_filters( 'woosc_product_name', $product_obj->get_name() );
  • wpc-smart-compare.php line 2249 · used in 4 places
    apply_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 );
  • wpc-smart-compare.php line 2158 · used in 4 places
    apply_filters( 'woosc_product_visible', $product_obj->is_visible(), $product_obj, 'bar' );
  • wpc-smart-compare.php line 2622 · used in 3 places
    apply_filters( 'woosc_disable_nonce_check', false, 'search' );
  • wpc-smart-compare.php line 1170 · used in 2 places
    apply_filters( 'woosc_bar_bg_color_default', '#292a30' );
  • wpc-smart-compare.php line 1182 · used in 2 places
    apply_filters( 'woosc_bar_btn_color_default', '#00a0d2' );
  • wpc-smart-compare.php line 331 · used in 2 places
    apply_filters( 'woosc_button_normal_icon', self::get_setting( 'button_normal_icon', 'woosc-icon-1' ) );
  • wpc-smart-compare.php line 205 · used in 2 places
    apply_filters( 'woosc_button_position_archive', self::get_setting( 'button_archive', apply_filters( 'woosc_button_position_archive_default', 'after_add_to_cart' ) ) );
  • wpc-smart-compare.php line 205 · used in 2 places
    apply_filters( 'woosc_button_position_archive_default', 'after_add_to_cart' );
  • wpc-smart-compare.php line 233 · used in 2 places
    apply_filters( 'woosc_button_position_single', self::get_setting( 'button_single', apply_filters( 'woosc_button_position_single_default', '31' ) ) );
  • wpc-smart-compare.php line 233 · used in 2 places
    apply_filters( 'woosc_button_position_single_default', '31' );
  • wpc-smart-compare.php line 2454 · used in 2 places
    apply_filters( 'woosc_get_table', $table );
  • wpc-smart-compare.php line 3207
    do_action( 'woosc_after_quick_table', $product );
  • wpc-smart-compare.php line 3204
    do_action( 'woosc_after_quick_table_products', $product );
  • wpc-smart-compare.php line 2997
    apply_filters( 'woosc_area_class', $class );
  • wpc-smart-compare.php line 2998
    apply_filters( 'woosc_bar_bg_color', self::get_setting( 'bar_bg_color', $bar_bg_color_default ) );
  • wpc-smart-compare.php line 2999
    apply_filters( 'woosc_bar_btn_color', self::get_setting( 'bar_btn_color', $bar_btn_color_default ) );
  • wpc-smart-compare.php line 3050
    apply_filters( 'woosc_bar_btn_text', self::localization( 'bar_button', esc_html__( 'Compare', 'woo-smart-compare' ) ) );
  • wpc-smart-compare.php line 2221
    apply_filters( 'woosc_bar_product_class', $product_class, $product_obj );
  • wpc-smart-compare.php line 3197
    do_action( 'woosc_before_quick_table', $product );
  • wpc-smart-compare.php line 3202
    do_action( 'woosc_before_quick_table_products', $product );
  • wpc-smart-compare.php line 332
    apply_filters( 'woosc_button_added_icon', self::get_setting( 'button_added_icon', 'woosc-icon-74' ) );
  • wpc-smart-compare.php line 2840
    apply_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 );
  • wpc-smart-compare.php line 2839
    apply_filters( 'woosc_button_class', $button_class, $attrs );
  • wpc-smart-compare.php line 2856
    apply_filters( 'woosc_button_html', $output, $attrs['id'] );
  • wpc-smart-compare.php line 735
    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... );
  • wpc-smart-compare.php line 764
    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__( ... );
  • wpc-smart-compare.php line 2850
    apply_filters( 'woosc_button_rel', 'nofollow' );
  • wpc-smart-compare.php line 329
    apply_filters( 'woosc_button_text', self::localization( 'button', esc_html__( 'Compare', 'woo-smart-compare' ) ) );
  • wpc-smart-compare.php line 330
    apply_filters( 'woosc_button_text_added', self::localization( 'button_added', esc_html__( 'Compare', 'woo-smart-compare' ) ) );
  • wpc-smart-compare.php line 150
    apply_filters( 'woosc_disable_security_check', $check, $context );
  • wpc-smart-compare.php line 2559
    apply_filters( 'woosc_field_value', $field_value, $field_key, $product_id, $product_data );
  • woosc_fields

    filter
    wpc-smart-compare.php line 163
    apply_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(... );
  • wpc-smart-compare.php line 3689
    apply_filters( 'woosc_generate_key', $key );
  • woosc_get_bar

    filter
    wpc-smart-compare.php line 2227
    apply_filters( 'woosc_get_bar', $bar );
  • wpc-smart-compare.php line 3436
    apply_filters( 'woosc_get_count', count( $products ) );
  • wpc-smart-compare.php line 3617
    apply_filters( 'woosc_get_fields', $saved_fields6, $context );
  • wpc-smart-compare.php line 2195
    apply_filters( 'woosc_get_filter', $select );
  • wpc-smart-compare.php line 3399
    apply_filters( 'woosc_get_page_url', esc_url( $page_url ) );
  • wpc-smart-compare.php line 3430
    apply_filters( 'woosc_get_products', $products, $type );
  • wpc-smart-compare.php line 3657
    apply_filters( 'woosc_get_setting', $setting, $name, $default );
  • wpc-smart-compare.php line 3475
    apply_filters( 'woosc_get_settings', self::$settings );
  • wpc-smart-compare.php line 3351
    apply_filters( 'woosc_get_share_url', $url );
  • wpc-smart-compare.php line 2271
    apply_filters( 'woosc_get_sidebar', $sidebar );
  • wpc-smart-compare.php line 2459
    apply_filters( 'woosc_get_table_minimum_columns', 3, $products_data );
  • wpc-smart-compare.php line 2283
    apply_filters( 'woosc_get_table_unauthenticated', $table );
  • wpc-smart-compare.php line 3415
    apply_filters( 'woosc_get_user_key', md5( 'woosc' . $user_id ), $user_id );
  • wpc-smart-compare.php line 303
    apply_filters( 'woosc_hide_empty_row', 'yes' );
  • wpc-smart-compare.php line 3462
    apply_filters( 'woosc_is_protected', $is_protected, $product );
  • wpc-smart-compare.php line 3674
    apply_filters( 'woosc_key_characters', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' );
  • wpc-smart-compare.php line 3677
    apply_filters( 'woosc_key_length', $length );
  • wpc-smart-compare.php line 3669
    apply_filters( "woosc_localization_{$key}", $str );
  • wpc-smart-compare.php line 3141
    apply_filters( 'woosc_menu_item', $menu_item );
  • wpc-smart-compare.php line 3140
    apply_filters( 'woosc_menu_item_class', 'menu-item woosc-menu-item menu-item-type-woosc' );
  • wpc-smart-compare.php line 3140
    apply_filters( 'woosc_menu_item_label', self::localization( 'menu', esc_html__( 'Compare', 'woo-smart-compare' ) ) );
  • wpc-smart-compare.php line 3167
    apply_filters( 'woosc_myaccount_compare_content', do_shortcode( '[woosc_list]' ) );
  • wpc-smart-compare.php line 3156
    apply_filters( 'woosc_myaccount_compare_label', esc_html__( 'Compare', 'woo-smart-compare' ) );
  • wpc-smart-compare.php line 2303
    apply_filters( 'woosc_page_product_remove', self::get_setting( 'remove', 'yes' ) === 'yes' );
  • wpc-smart-compare.php line 2304
    apply_filters( 'woosc_page_remove_all', self::get_setting( 'bar_remove', 'no' ) === 'yes' );
  • wpc-smart-compare.php line 2502
    apply_filters( 'woosc_print_above_name', '' );
  • wpc-smart-compare.php line 2514
    apply_filters( 'woosc_print_below_name', '' );
  • wpc-smart-compare.php line 2386
    apply_filters( 'woosc_product_add_to_cart', do_shortcode( '[add_to_cart style="" show_price="false" id="' . $product_id . '"]' ), $product_obj );
  • wpc-smart-compare.php line 2425
    apply_filters( 'woosc_product_additional', $additional, $product_obj );
  • wpc-smart-compare.php line 2438
    apply_filters( 'woosc_product_availability', $product_availability['availability'], $product_obj );
  • wpc-smart-compare.php line 2417
    apply_filters( 'woosc_product_content', do_shortcode( $content ), $product_obj );
  • wpc-smart-compare.php line 2403
    apply_filters( 'woosc_product_description', $description, $product_obj );
  • wpc-smart-compare.php line 2431
    apply_filters( 'woosc_product_dimensions', wc_format_dimensions( $product_obj->get_dimensions( false ) ), $product_obj );
  • wpc-smart-compare.php line 2348
    apply_filters( 'woosc_product_filter', $product_filter, $product_obj );
  • wpc-smart-compare.php line 2380
    apply_filters( 'woosc_product_price', $product_obj->get_price_html(), $product_obj );
  • wpc-smart-compare.php line 2434
    apply_filters( 'woosc_product_rating', wc_get_rating_html( $product_obj->get_average_rating() ), $product_obj );
  • wpc-smart-compare.php line 2444
    apply_filters( "woosc_product_sc_{$key}", do_shortcode( str_replace( '{product_id}', $product_id, $field_name ) ), $product_obj );
  • wpc-smart-compare.php line 2377
    apply_filters( 'woosc_product_sku', $product_obj->get_sku(), $product_obj );
  • wpc-smart-compare.php line 2383
    apply_filters( 'woosc_product_stock', wc_get_stock_html( $product_obj ), $product_obj );
  • wpc-smart-compare.php line 2428
    apply_filters( 'woosc_product_weight', wc_format_weight( $product_obj->get_weight() ), $product_obj );
  • wpc-smart-compare.php line 3195
    apply_filters( 'woosc_quick_table_class', $quick_table_class );
  • wpc-smart-compare.php line 333
    apply_filters( 'woosc_quick_table_fixed', json_encode( apply_filters( 'woosc_quick_table_fixed_arr', [ 'pc' => 2, 'ta' => 1, 'mo' => 0, ] ) ) );
  • wpc-smart-compare.php line 333
    apply_filters( 'woosc_quick_table_fixed_arr', [ 'pc' => 2, 'ta' => 1, 'mo' => 0, ] );
  • wpc-smart-compare.php line 3198
    apply_filters( 'woosc_quick_table_heading', '<h2>' . self::localization( 'quick_table_heading', esc_html__( 'Quick Comparison', 'woo-smart-compare' ) ) . '</h2>' );
  • wpc-smart-compare.php line 3182
    apply_filters( 'woosc_quick_table_limit', 5 );
  • wpc-smart-compare.php line 2669
    apply_filters( 'woosc_search_args', $args );
  • wpc-smart-compare.php line 2660
    apply_filters( 'woosc_search_default_products', array_unique( $related ), $products );
  • wpc-smart-compare.php line 2675
    apply_filters( 'woosc_search_exclude', false, $pr, $products );
  • woosc_vars

    filter
    wpc-smart-compare.php line 296
    apply_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: