1. Home
  2. Docs
  3. Compare Affiliated Products
  4. Developper
  5. Hooks


In order to help developpers to make Compare Affiliated Products their own, I put some hooks, action and filter in the code.


If I’ve forgotten ou you need an Hook somewhere, please contact me here


    • do_action( 'thfo_compare_after_price', $this );

      This hook fire in the AAWP Template to show the affiliated products


  • apply_filters( 'compare_partner_name', $p['partner_name'] )

    Allow you to filter the partners logo

  • apply_filters( 'compare_currency_unit', $currency );

    Allow you to customize the currency unit or replace the letter code by the symbol.


    add_filter( 'compare_currency_unit', 'thfo_customize_currency_symbol' );
    function thfo_customize_currency_symbol( $currency ) {
       return '€';


  • apply_filters( 'compare_settings_tab', $tabs );

    Allow you to add settings tabs

  • apply_filters('compare_time_limit', 600);



    add_filter( 'compare_time_limit', 'change_time_limit' );
    function change_time_limit( $secondes) {
       return 6000;

    Allow you to increase PHP limit time in import and register infos.

  • $partners = apply_filters( 'compare_partners_code', array( 'Cdiscount'=> '6948', 'Toy\'R us' => '7108', 'Oxybul eveil et jeux' => '7103','Rue du Commerce' => '6901') );

    Allow you to customize logo & partner code before displaying

  • Since 1.2.6
    $tracker  = apply_filters( 'compare_url_tracker', get_bloginfo('url') );

    Allow customizing the expression to track the URL. by default: the website URL

Was this article helpful to you? Yes No

How can we help?