HVAC Community Events Plugin Installer

Installing Plugin from URL

'; echo "Attempting to install plugin from: $plugin_zip_url\n"; $result = $upgrader->install($plugin_zip_url); if ($result) { echo "Plugin installed successfully.\n"; // Activate the plugin $plugin_main_file = 'hvac-community-events/hvac-community-events.php'; $activate = activate_plugin($plugin_main_file); if (is_wp_error($activate)) { echo "Error activating plugin: " . $activate->get_error_message() . "\n"; } else { echo "Plugin activated successfully.\n"; // Create .env file with Zoho settings $env_file = $plugin_dir . '/.env'; $env_content = "# Zoho API Credentials\n"; $env_content .= "ZOHO_CLIENT_ID=your_client_id_here\n"; $env_content .= "ZOHO_CLIENT_SECRET=your_client_secret_here\n"; $env_content .= "ZOHO_REDIRECT_URI={$staging_url}/wp-admin/admin-ajax.php?action=zoho_oauth_callback\n"; $env_content .= "ZOHO_REFRESH_TOKEN=your_refresh_token_here\n\n"; $env_content .= "# Site URL Settings\n"; $env_content .= "UPSKILL_STAGING_URL={$staging_url}\n"; if (file_put_contents($env_file, $env_content)) { echo "Created .env file with default settings.\n"; } else { echo "Could not create .env file. Please create it manually.\n"; } } } else { echo "Error installing plugin.\n"; if (is_wp_error($skin->result)) { echo "Error: " . $skin->result->get_error_message() . "\n"; } } echo ''; ?>

Plugin Installation Form


Manual Plugin Upload

If the automatic installation fails, you can manually upload the plugin:

  1. Go to WordPress Plugin Upload
  2. Upload the plugin ZIP file
  3. Activate the plugin

Create .env File

After installing the plugin, create a .env file in the plugin directory with these settings:

# Zoho API Credentials
ZOHO_CLIENT_ID=your_client_id_here
ZOHO_CLIENT_SECRET=your_client_secret_here
ZOHO_REDIRECT_URI=/wp-admin/admin-ajax.php?action=zoho_oauth_callback
ZOHO_REFRESH_TOKEN=your_refresh_token_here

# Site URL Settings
UPSKILL_STAGING_URL=

Plugin Status

HVAC Community Events plugin is installed and active.

'; // Check .env file if (file_exists($plugin_dir . '/.env')) { echo '

.env file exists in the plugin directory.

'; } else { echo '

.env file does not exist in the plugin directory.

'; } } else { if (file_exists($plugin_dir)) { echo '

HVAC Community Events plugin is installed but not active.

'; } else { echo '

HVAC Community Events plugin is not installed.

'; } } ?>