How to Use the WPCode Integration
In This Document
Reading time: 4 minutes | Difficulty: Beginner
Overview
WPCode is a popular WordPress plugin for managing custom code snippets — header/footer scripts, custom PHP, custom CSS, conversion pixels, and so on. WP Simple Pay’s WPCode integration registers an official wpsimplepay username inside WPCode’s snippet library, making it easy to discover and install WP Simple Pay-specific code snippets without copying from documentation pages.
When the integration is active, you can search WPCode’s library for snippets like “WP Simple Pay – Hide Title”, “WP Simple Pay – Custom Currency Format”, or “WP Simple Pay – Conditional Field Display” and install them with one click. The snippets run inside WPCode’s safe execution environment and can be enabled, disabled, or modified through WPCode’s UI.
Prerequisites
- WP Simple Pay (any tier)
- The WPCode plugin installed and activated
Step 1: Install WPCode
If you don’t have WPCode yet:
- Navigate to Plugins > Add New in your WordPress admin.
- Search for WPCode.
- Install and activate the plugin published by WPCode (formerly “Insert Headers and Footers”).
The free version is sufficient for using the WP Simple Pay snippet library.
Step 2: Verify the Integration is Active
Once both plugins are active, the integration registers automatically — no manual configuration required. To verify:
- Navigate to Code Snippets > Library in your WordPress admin (the WPCode menu).
- Browse or search the library.
- Look for snippets authored by WP Simple Pay.
Step 3: Browse WP Simple Pay Snippets
Inside WPCode’s Library, you can filter or search for snippets contributed by the WP Simple Pay team. Common categories of available snippets include:
- Form behavior tweaks — Hide titles, change button labels, restrict submit timing
- Conditional logic — Show/hide fields based on form state or user data
- Currency and formatting — Custom currency display rules, number formatting
- Email customizations — Modify email templates, append data to emails
- Frontend display — Adjust how forms render on specific pages or templates
- Webhook customizations — Modify webhook payload behavior
- Advanced developer hooks — Filters and actions for fine-grained customization
Each snippet includes a description, author byline, and a preview of the code so you can review what it does before installing.
Step 4: Install a Snippet
When you find a snippet you want:
- Click the snippet card to open its detail page.
- Click Use Snippet (or Install, depending on the WPCode version).
- WPCode imports the snippet into your site as a draft. It is not active by default — review it first.
- Click Save and Activate to enable it.
WPCode handles the execution environment so you don’t need to edit theme or plugin files directly.
Step 5: Manage Installed Snippets
Installed snippets appear under Code Snippets > All Snippets. From there you can:
- Toggle a snippet on or off
- Edit the code (useful for customizing parameters like form IDs)
- Schedule when the snippet runs (specific pages, devices, user roles)
- Disable a snippet temporarily for troubleshooting
Why Use WPCode Instead of Editing Files Directly?
| WPCode + WP Simple Pay snippets | Editing functions.php or a custom plugin |
|
|---|---|---|
| Syntax errors | Caught and rolled back automatically | Can white-screen your site |
| Update safety | Snippets persist across plugin/theme updates | Theme updates can erase changes |
| Visibility | All custom code visible in one place | Scattered across files |
| Deactivation | One-click disable | Requires file edit or FTP |
| Version control | Built-in change tracking | Manual git/backup |
For non-developers, WPCode is the safer way to apply customizations. For developers, it’s still useful because all your custom code is centralized and survives plugin/theme replacement.
Frequently Asked Questions
Where can I see WP Simple Pay’s snippet library?
Inside WPCode’s Library tab once both plugins are active. You can also browse the public library at the WPCode website and search for “WP Simple Pay” — but installing requires the WPCode plugin running on your site.
Are snippets free?
WP Simple Pay’s official snippets are free. Some advanced snippets may require a WPCode Pro subscription if they use Pro-only WPCode features (e.g., conditional logic, scheduling), but the snippets themselves don’t cost extra.
Can I write my own snippets?
Yes. WPCode supports custom snippets you author yourself — they don’t need to come from the library. The integration only registers WP Simple Pay’s library username; it doesn’t restrict what you can do with WPCode otherwise.
Will snippets break when I update WP Simple Pay?
WP Simple Pay maintains a stable filter and action API, so most snippets continue working across releases. If a snippet relies on an internal function that changes, it will fail gracefully (or be marked as deprecated in the snippet’s WPCode listing). Always test snippets after major plugin updates.
How is this different from the Automations tab?
The Automations tab integrates with Uncanny Automator for no-code workflows between WP Simple Pay events and other apps. WPCode is for PHP/JS/CSS customizations on your own site. They serve different needs and can be used together.
Why don’t I see WP Simple Pay snippets in WPCode?
Make sure both plugins are active and that you’re looking at the Library tab, not your local snippets list. The integration registers on WPCode admin pages, so visit Code Snippets > Library at least once after activation to ensure the registration runs.
What’s Next?
- How to Use the Automations Tab – No-code automations via Uncanny Automator
- General Information About Integrations – Other integrations available
Still have questions? We're here to help!
Last Modified: