Create an integration
Use our Integration Boilerplate Plugin to create an integration for North Commerce. There may be some cases where you will need to verify your integration with the North Commerce team.
Setup your environment
Create a local development environment for your North Commerce integration
Create a folder
/wp-content/plugins/north-commerce-integration-boilerplate/
Clone the boilerplate from https://github.com/kelleymuro/north-commerce-addon-boilerplate
Remove .git and .gitignore or modify them to your own needs
Change info.json
Replace {variables} to your own values. E.g plugin Name, last_updated, description, etc.
Run the generator
In your browser visit your-domain.local/wp-content/plugins/north-commerce-integration- boilerplate/integration-boilerplate-generator.php
Once the generator has ran rename the plugin folder north-commerce-integration-boilerplate
to north-commerce-{slug}
Remove the generator file from the project now that it is no longer needed /wp-content/plugins/north-commerce-shipstation/integration-boilerplate- generator.php
Have fun!
Modify the README.txt file and modify the plugin code to suit your needs for an integration
Plugin Structure
In the boilerplate plugin you will notice a few folders and files.
admin
- This folder contains files for the plugin's admin panel in WordPressassets
- This folder contains css, js and image files for your integrationincludes
- This folder contains plugin functionality files or "the business logic"includes/integrations
- This folder contains examples and code to integrate with a required service. You will see examples with Shipstationintegration-boilerplate-generator.php
- This file is used to modify the initial plugin code according to your parameters from the info.json. It is needed only once at the beginning of plugin creation. Please dont forget to delete after running the generator from your browser.info.json
- This files is required to initalize the plugin generator. This file also is necessary to specify plugin version anmd to update your plugin from a server in the future.README.txt
- The plugin requires a standardREADME.txt
file containing the plugin description and version history
Webhook Integration
File: includes/integrations/class-north-commerce-webhooks.php
Designed to create webhooks for required Events in the "north-commerce" plugin
Reference implementation available at:
north-commerce-addon-boilerplate/includes/integrations/class-north-commerce-webhooks.php
REST API Integration
File: includes/integrations/class-north-commerce-plugin-rest-api.php
Creates new REST API endpoints for Event-triggered functionality
Reference implementation available at:
north-commerce-addon-boilerplate/includes/integrations/class-north-commerce-plugin-rest-api.php
Service Integration
File: includes/integrations/class-north-commerce-send-order.php
Contains the core service integration code
Server Deployment
Access the server via FTP using "north-commerce" credentials
Navigate to
/var/convesio/wordpress/addons
Create a new folder with naming convention:
north-commerce-{your-plugin-name}
Copy the following files to the folder:
info.json
(from plugin folder)screenshot-1.jpg
(plugin screenshot)north-commerce-slug.zip
(plugin archive excluding.git
,.gitignore
, etc.)
Integration Setup
Create Integration Placeholder
Navigate to
north-commerce/admin/core/integration/placeholders/
Create a new placeholder class file following existing patterns
Set
OPTIONAL_KEY = '{slug}_service'
Match existing placeholder implementations
Update Integration Class
Open
north-commerce/admin/class-north-commerce-integration.php
Add new integration code block in
define_integration_placeholders()
:
Deploy updated "north-commerce" plugin to Github
Plugin Updates
Version Update Process
Update version number in main plugin file header:
Update
info.json
:Update
version
fieldUpdate
last_updated
timestamp (format: "YYYY-MM-DD HH:MM:SS")Add changelog entry
Deployment Process
Push updated plugin to Github
Create plugin archive (excluding
.git
,.gitignore
, etc.)Upload via FTP:
Archive to
/var/convesio/wordpress/addons/your-plugin/
Updated
info.json
to same directory
Update Hooks
The plugin update process utilizes three hooks in the main plugin file. Reference implementation available at: north-commerce-shipstation/north-commerce-shipstation.php
Best Practices
Always prefix plugin folders with
north-commerce-
Maintain clean archives (exclude development files)
Follow version numbering convention (increment by 0.0.1)
Keep changelog entries descriptive and dated
Last updated