How to Enable Credit Card Field Without Stripe Addon


Do you need to accept credit cards but don’t have the WPForms Stripe Addon enabled? If you’re using a different 3rd party service but still need to accept credit cards, you can easily allow this with a custom code snippet. We can show you how to enable the Credit Card field without the Stripe addon using PHP.

The Credit Card field in WPForms will, by default, be hidden until the Stripe addon is installed and activated.

This is by design, as the Credit Card field will not store any details to your site’s database and is only able to send data to a third-party source (currently, Stripe is the only built-in option for this).

If you have built a custom integration, however, you may still need to use the Credit Card field.


To make the Credit Card field display in the form builder without the Stripe Addon, you can add the following filter to your site:

 * Determines whether Credit Card field will be displayed in form builder.
 * @link
 * @param  array $enable_cc
 * @return bool

add_filter( 'wpforms_field_credit_card_enable', '__return_true' );

Now when you go into the form builder, you’ll see a new option for Payment Fields.

Enable credit card field on your site without the Stripe Addon

And that’s all you need to enable the Credit Card form field without using the Stripe addon. Would you like to be able to change the CSV separator when exporting form entries? We’ll walk you through how to achieve this in our article on How to Change CSV Export Delimiter.

Filter Reference: wpforms_field_credit_card_enable