exchange_code_for_tokens($_GET['code'])) { add_settings_error( 'hvac_zoho_messages', 'hvac_zoho_auth_success', 'Successfully connected to Zoho CRM!', 'success' ); } else { add_settings_error( 'hvac_zoho_messages', 'hvac_zoho_auth_error', 'Failed to connect to Zoho CRM. Please check your credentials.', 'error' ); } // Redirect to remove code from URL wp_redirect(admin_url('edit.php?post_type=tribe_events&page=hvac-zoho-crm')); exit; } } /** * Display admin page */ public function admin_page() { ?>

Zoho CRM Integration

Zoho CRM configuration file not found. Please follow the setup instructions below.

Setup Instructions

  1. Register your application in Zoho: Go to Zoho API Console
  2. Create a new Server-based Application
  3. Set redirect URI to:
  4. Copy your Client ID and Client Secret
  5. Run the setup helper script from command line:
    cd zoho
    php setup-helper.php
make_api_request('/crm/v2/org'); $connected = !is_wp_error($org_info) && isset($org_info['org']); ?>

✓ Connected to Zoho CRM

Organization Information

Organization Name
Organization ID
Time Zone

Integration Status

display_integration_status(); ?>

Actions

Test Sync Create Custom Fields

✗ Not connected to Zoho CRM

Reconnect to Zoho

Click the button below to authorize this application with Zoho CRM:

Connect to Zoho CRM

Module Fields Configured Last Sync Status
Campaigns (Events) check_custom_fields('Campaigns'); ?>
Contacts (Users) check_custom_fields('Contacts'); ?>
Invoices (Orders) check_custom_fields('Invoices'); ?>
Pending'; } } // Initialize admin interface if (is_admin()) { new HVAC_Zoho_Admin(); }