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

Hooks

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

Disclaimer

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

Actions

  • This hook fire in the AAWP Template to show the affiliated product do_action( 'thfo_compare_after_price', $this );

Filters

  • Allow you to filter the partners logo 
    apply_filters( 'compare_partner_name', $p['partner_name'] )
  • Allow you to customize the currency unit or replace the letter code by the symbol
    apply_filters( 'compare_currency_unit', $currency );
  • Allow you to add settings tabs
    apply_filters( 'compare_settings_tab', $tabs );
  • Allow you to increase PHP limit time in import and register infos. 
    apply_filters('compare_time_limit', 600);
  • Allow you to customize logo & partner code before displaying apply_filters( 'compare_partners_code', array( 'Cdiscount'=> '6948', 'Toy\'R us' => '7108', 'Oxybul eveil et jeux' => '7103','Rue du Commerce' => '6901') );


  • Allow customizing the expression to track the URL. by default: the website URL apply_filters( 'compare_url_tracker', get_bloginfo('url') );
  • Enqueue your own CSS file add_filter('cap_enqueue_css', $css );

Was this article helpful to you? Yes No

How can we help?