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:
- Add JS inline to your theme’s footer file (footer.php).
- 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.
- 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 and Scripts n Styles. 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.