WP Simple Pay Documentation

Documentation, Reference Materials, and Tutorials for WP Simple Pay

How to Add Custom Code to WP Simple Pay

This article details adding custom code to your WordPress site and is intended for developers. Although we don’t provide custom development services ourselves, if you need help, we highly recommend Codeable.

Custom code snippets are provided as-is, and there is no guarantee they will continue working across multiple WP Simple Pay versions.

Do you need to add specific functionality to your WP Simple Pay payment forms that are unavailable in the plugin settings?

If you’re not an experienced WordPress developer but somewhat comfortable with PHP or JavaScript, copying and pasting code snippets is pretty straightforward.

Just make sure to back up your site first and test on a staging or local site before changing your live site.

From there, follow the Beginner’s Guide to Pasting Snippets from the Web into WordPress from WPBeginner.

Using Our Code Snippet Library

We also have a code snippet library for WP Simple Pay. This library holds example code using various filter and action hooks available in the plugin.

We recommend using the free plugin WP Code when adding code from our snippet library.

To use one of our code snippets with WP Code, go to Code Snippets → +Add Snippet and select the Add Your Custom Code snippet.

When choosing a PHP Snippet code type, WP Code automatically adds the opening <?php tag. Please ensure that you do not inadvertently add a second.

Be sure to select the PHP Snippet Code Type and toggle your snippet to Active after you have made any necessary changes and are ready to make the code live. All other settings can remain at their defaults.

add custom code snippet wp code

Here are just a few of the code snippets available:

Still have questions? We’re here to help!

Last Modified:

Start Accepting Payments Today

Start accepting one-time and recurring payments or donations on your WordPress website.