Filter: ‘ewi_register_user_attribs’ – run before new user is synced to Intercom.
Variables:
$custom_attribs – array of custom attribute ‘key’ => ‘value’ pairs
$user_id – int representing the user who just got registered
Filter: ‘ewi_footer_js_attribs’ – run at footer of front-end pages when user is logged in.
Parameters:
Array $init_array – Used to initialise the Intercom footer widget
Integer $user_id – Representing the user who is currently logged in
Filter: ‘ewi_footer_js_attribs_all_visitors – run at footer of front-end pages for all visitors/users.
Parameters:
Array $init_array – Used to initialise the Intercom footer widget
Filter: ‘ewi_add_footer’ – allow for programmatically disabling the footer JS for specific page or users
Parameters:
Boolean $bool – (default true) Whether or not to add the inject the front-end widget JS
WP_User $user – Result of wp_get_current_user()
Actions: ‘ewi_before_footer_js’ & ‘ewi_after_footer_js’ – allow for injecting JS into the script object on front-end
Parameters:
String $app_id – the Intercom App ID from the eWI Setting Page
Array $init_array – array used to initialise the Intercom footer widget
Filter: ‘ewi_update_counts’ – add/edit/remove custom counts for syncing into Intercom
Parameters
Array $counts Consisting of counts. Default: array( ‘order_count’ => int , ‘total_spend’ => int )
Integer $user_id – representing the user being updated