Installation Steps
You can integrate Monime into a custom plugin by loading your adapter class and registering it with Monime during plugin boot.1. Install the Core Plugin
- Install and activate Monime Gateway.
- Confirm that the shared Monime settings page appears in WordPress admin.
2. Add Your Custom Integration
- Add your custom plugin or theme code that implements the Monime adapter interfaces.
- Load your adapter classes from the main plugin file or bootstrap file.
- Register the payment adapter from the main plugin file during plugin boot.
- If your plugin handles webhooks, implement the webhook adapter on the same class or load that class before Monime initializes its webhook service.
Recommended File Structure
For a small plugin, keep the integration code in a dedicated class file and load it from your main plugin bootstrap file. Example structure:Example Registration
If You Also Handle Webhooks
If your custom plugin processes webhook data, make sure the webhook adapter class is also loaded and the same adapter instance implementsMonimeWebhookAdapterInterface.
In practice, that means your main plugin file should:
- require the adapter class file,
- register the payment adapter,
- and expose the webhook handler before Monime initializes its shared webhook service.
Verify the Setup
Confirm that your adapter class is available and that Monime can load it without autoloading errors. You can verify this by:- loading a page that triggers plugin boot,
- checking your PHP error log for class-loading problems,
- and running a test checkout plus a test webhook to confirm that both the payment flow and callback flow work.