Woocommerce

Automatically Register Customers in Stripe

By default, when an order is placed on a WooCommerce site using Stripe, the order is obviously sent to Stripe, a payment is stored, but a Stripe customer is created only if the “saved cards” feature is used, otherwise no customer is created in Stripe.

Automatically Register Customers in Stripe for orders placed in WooCommerce

To create a customer in Stripe for every single order placed on WooCommerce, you can add this snippet to the file called functions.php in your theme folder, or you can add it using a plugin like Code Snippets.

//Force customer creation process in Stripe
add_filter( 'wc_stripe_force_save_source', '__return_true' );

WHERE TO ADD THIS CODE?

You can place PHP snippets at the bottom of your functions.php file, We recommend to use child them so you will not lose any changes when updating your theme  –

Did this snippet work?

Please let me know in the comments if the snippet worked as expected. I would be happy to revise the code if you report otherwise or in case you need more assistance.

Show More

Leave a Reply

Your email address will not be published. Required fields are marked *

6 − 4 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close
Close