MP_Addon_CalculatorsZohoAddon::init()
Init function.
Source Source
File: calculator-zoho-add-on/calculator-zoho-add-on.php
public function init() {
if ( isset(get_option( MortgagePlatform::$prefix . 'export' )['allow_zoho']) && get_option( MortgagePlatform::$prefix . 'export' )['allow_zoho'] ) {
add_action( 'export_lead_data', array( new MP_Addon_Zoho, 'set_lead_data_to_zoho' ) );
}
add_filter( MortgagePlatform::$prefix . 'export', array( new MP_Addon_Zoho_Settings, 'filter_export_data_settings' ), 40 );
add_action( 'admin_menu', array( $this, 'add_zoho_addon' ), 50 );
add_action( 'init', array(new MP_Addon_Zoho, 'decode_state'), 9 );
add_action( 'admin_init', array( new MP_Addon_Zoho_Settings, 'register' ) , 40);
if(!empty(get_option(MortgagePlatform::$prefix . 'zoho_access_token'))){
add_action( 'add_meta_boxes', array( new MP_Addon_Zoho_Settings, 'zoho_metabox' ), 20 );
add_filter(MortgagePlatform::$prefix . 'add_connectors', array(new MP_Addon_Zoho_Settings, 'export_to_zoho'));
add_action(MortgagePlatform::$prefix . 'connector', array( new MP_Addon_Zoho, 'send_zoho_manually' ));
}
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
add_action( 'wp_ajax_zoho_revoke_token', array( new MP_Addon_Zoho, 'revoke_token' ) );
add_action( 'wp_ajax_zoho_send', array( new MP_Addon_Zoho, 'zoho_send_from_lead_page' ) );
add_action( 'wp_ajax_export_csv_zoho', array( new MP_Addon_Zoho, 'zoho_csv' ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |