If you’re looking for additional functionality not found in the plugin settings, there are many customizations you can make by extending WP Simple Pay via code using WordPress filter and action hooks.
To help you get up and running with adding functionality this way, we have put together a code snippet library. This library holds example code making use of various filter and action hooks available in the plugin.
Most of these examples are written as mini-plugins which you can add to your site in several different ways. Check out how to add custom functions to learn more.
If you don’t find a code snippet that meets your needs or you want to know what hooks are available to you, see the action & filter hook reference for WP Simple Pay Pro.
Note we do not recommend altering WP Simple Pay code directly as it will be overwritten with any plugin update.
Here are just a few of the code snippets available:
- Replace translatable text (i.e. the coupon “Apply” button and “remove” link text). Alternatively, use a translation plugin such as Loco Translate.
- Customize the currency settings for each payment form.
- Conditionally dequeue plugin scripts and styles.
- Specify alternate Stripe API keys (Stripe accounts) on different pages.
- Create a new WordPress user using the email address of one-time or subscription charges.
- Add custom template tags to be used with the payment confirmation messages.
- Change the custom amount field to “number” type to show the decimal key on iOS & mobile browsers.
If you’re a developer and want to contribute a code snippet please open up a pull request on the GitHub repository.