Adding Custom JavaScript to WP Simple Pay - WP Simple Pay Documentation
  1. Home
  2. Advanced
  3. Adding Custom JavaScript to WP Simple Pay

Adding Custom JavaScript 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.

Please note: Custom code snippets are provided as-is and there is no guarantee they will continue to work across multiple versions of WP Simple Pay.

Do you need to add custom JavaScript to a WP Simple Pay payment form, such as to launch the overlay or Stripe Checkout form from other buttons or links?

Here are a few ways to add custom JavaScript to your site:

  1. Add JS inline to your theme’s footer file (footer.php).
  2. Add a separate JS file to your theme and use the wp_enqueue_script function to reference it in your functions.php or a separate custom plugin.
  3. Use a 3rd party plugin made for injecting custom JS to your site. This method doesn’t involve modifying your theme or creating a separate plugin. We like Insert Headers and Footers. The latter allows you to add JS only to specific pages if needed.

If you need to remove the plugin scripts completely find out how with our snippet library.

Was this article helpful?

Still stuck? How can we help?
Updated on February 25, 2021