MP_Addon_CalculatorsSalesforceAddon::init()
Init function.
Source Source
File: calculator-salesforce-add-on/calculator-salesforce-add-on.php
public function init() {
if ( isset(get_option( MortgagePlatform::$prefix . 'export' )['allow_salesforce']) && get_option( MortgagePlatform::$prefix . 'export' )['allow_salesforce'] ) {
add_action( 'export_lead_data', array( new MP_Addon_Salesforce, 'set_lead_data_to_salesforce' ) );
}
add_filter( MortgagePlatform::$prefix . 'export', array( new MP_Addon_Salesforce_Settings, 'filter_export_data_settings' ), 40 );
add_action( 'admin_menu', array( $this, 'add_salesforce_addon' ), 50 );
add_action( 'admin_init', array( new MP_Addon_Salesforce_Settings, 'register' ), 40 );
add_action( 'init', array(new MP_Addon_Salesforce, 'decode_state'), 9 );
if(!empty(get_option(MortgagePlatform::$prefix . 'salesforce_access_token'))) {
add_action( 'add_meta_boxes', array( new MP_Addon_Salesforce_Settings, 'salesforce_metabox' ), 20 );
add_filter(MortgagePlatform::$prefix . 'add_connectors', array(new MP_Addon_Salesforce_Settings, 'export_to_salesforce'));
add_action(MortgagePlatform::$prefix . 'connector', array( new MP_Addon_Salesforce, 'send_salesforce_manually' ));
}
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
add_action( 'wp_ajax_salesforce_revoke_token', array( new MP_Addon_Salesforce, 'revoke_token' ) );
add_action( 'wp_ajax_salesforce_send', array( new MP_Addon_Salesforce, 'salesforce_send_from_lead_page' ) );
add_action( 'wp_ajax_export_csv_salesforce', array( new MP_Addon_Salesforce, 'salesforce_csv' ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |