Contact Information

  • Mail: info@diglabs.com
  • Website: https://diglabs.com

As of version 2.3.13 (release coming soon) the Stripe Payments Plugin supports easier custom coding options. This makes it possible for your customizations to persist across plugin and theme updates. Here is how you should do it:

Custom CSS

The plugin has a default theme and layout that works for most sites. The HTML for the form provides a number of classes that can be used to customize the theme. To do this navigate to the plugin’s admin page and enter the custom CSS in the appropriate area on the Setup tab. Here is a screenshot:

custom-css

Custom JavaScript

At times adding a small amount of custom JavaScript is necessary to achieve the client-side experience you are looking for. To do this navigate to the plugin’s admin page and enter the custom JavaScript in the appropriate area on the Setup tab. Here is a screenshot:

custom-js

Custom PHP

The plugin provides a number of hooks to allow you to customize the payment experience. Sometimes this requires writing custom PHP functions. Previously these needed to be added to the theme’s functions.php file. This was an issue because updating the theme would cause these customizations to be lost. Now you can include a diglabs-stripe-payments-custom.php file in the WordPress plugin’s folder. Here is a screenshot:

custom-php

Note that the custom CSS and JavaScript are stored in the WordPress database. This means that this customization will persist across plugin and theme updates. It also means that database backups also capture the customized code. The payment form loads these customizations from files that are written to a custom directory inside the plugin’s main folder.

custom-files

This files are created when the Setup tab is saved. After a plugin update, if for some reason the files are not present, click the ‘Save’ button on the Setup tab to force the information to be re-written to the directory.