Setup & Installation
This document provides instructions for setting up the EDGE Store plugin in a development environment.
Requirements
- WordPress installation
- WooCommerce plugin installed and activated
- Composer for PHP dependency management
- Advanced Custom Fields (ACF) Pro plugin installed and activated
Installation Steps
- Clone the Repository: Clone the plugin repository into your WordPress
wp-content/plugins/directory.git clone git@bitbucket.org:tmwc/edge-store.git - Install Dependencies: Navigate to the plugin directory and install the PHP dependencies using Composer.
cd edge-store composer install - Activate the Plugin: Log in to your WordPress admin dashboard, navigate to “Plugins”, and activate the “EDGE Store” plugin.
Configuration
The plugin relies on a config.php file and environment constants for its core settings and API credentials.
Environment Constants
The following constants must be defined in your wp-config.php file. These are used to manage credentials and toggle between sandbox and production environments for the various services.
// General
define('IS_LOCAL', true); // Set to false in production
// Zoho
define('ZOHO_INV_CLIENT_ID', 'your-zoho-client-id');
define('ZOHO_INV_CLIENT_SECRET', 'your-zoho-client-secret');
define('ZOHO_INV_ORG_ID', 'your-zoho-org-id');
// Xero
define('XERO_CLIENT_ID', 'your-xero-client-id');
define('XERO_CLIENT_SECRET', 'your-xero-client-secret');
// ColourTech V2
define('COLOURTECH2_SANDBOX', true); // Use sandbox environment
define('COLOURTECH2_SANDOBOX_URL', 'https://sandbox.api.url');
define('COLOURTECH2_SANDBOX_TOKEN', 'your-sandbox-token');
define('COLOURTECH2_BASE_URL', 'https://production.api.url');
define('COLOURTECH2_TOKEN', 'your-production-token');
// Legacy ColourTech V1
define('COLOURTECH_SANDBOX', true);
define('COLOURTECH_SANDBOX_USER', 'sandbox-user');
define('COLOURTECH_SANDBOX_PASS', 'sandbox-pass');
// ... and so on for productionACF Options Pages
API credentials that are not stored in wp-config.php (e.g., for legacy systems or settings that need to be changed by admins) are managed via ACF Options pages. You will need to populate these settings in the WordPress admin area under the various “EDGE” menu items.