Do you need to add specific functionality to your WP Simple Pay payment forms not available in the plugin settings?
Just make sure to back up your site first and test on a staging or local site first before making changes to your live site.
From there, simply follow the Beginner’s Guide to Pasting Snippets from the Web into WordPress from WPBeginner.
We also have a code snippet library for WP Simple Pay. This library holds example code making use of various filter and action hooks available in the plugin.
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.
- Conditionally dequeue plugin scripts and styles.
- 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.
Note, we do not recommend altering WP Simple Pay code directly, as it will be overwritten with any plugin update.
Is there a place in our code that we could add another hook that would be useful to you? Please let us know.