wp_fusion_init_crm

#Overview

This action is triggered after WP Fusion has loaded the CRM integration module for the active CRM, but before WP Fusion has fully loaded.

It passes the active CRM by reference and allows you to modify properties of the active CRM.

Note: This action will not fire if WP Fusion is not connected to a CRM.

#Examples

#Whitelabel the CRM

This example renames the active CRM to a custom label.

function wpf_whitelabel_crm( &$crm ) {
	$crm->name = 'Custom Name';
}

add_action( 'wp_fusion_init_crm', 'wpf_whitelabel_crm' );

#Use a custom OAuth app

For swapping out WP Fusion’s built in OAuth client IDs in order to connect to your own OAuth app, see this tutorial.

function set_custom_zoho_app( &$crm ) {

	$crm->client_id        = '1000.XXXXXXXXXXXXXXXXXXXXX';
	$crm->client_secret_us = '08dccXXXXXXXXXXXXXXXXXXXXX';

}

add_action( 'wp_fusion_init_crm', 'set_custom_zoho_app' );