Code Snippet to Override Customer ID?
-
I’m new to working with this plugin. So far, I’ve managed to create PHP snippets to a) put the customer’s name and order number into the Stripe Description field and b) list the products ordered in the Stripe payment metadata section.
Now I’d like to figure out how to change the Customer ID field in Stripe to be the email address that the customer provided in WordPress/WooCommerce when they placed their order.
My goal in doing this is to have all orders which are placed under one email address be treated as belonging to the same customer in Stripe, regardless of whether the customer logged in to WordPress when they ordered or didn’t log in. We track customers by email address, so this fits our business model the best.
It’s not clear to me yet which side generates the customer ID’s that I’m seeing in Stripe, all of which are in the format cus_xxxxxxxxxxxxxx.
Is it Stripe that generates those IDs or wooCommerce or the plugin?
Is there a Stripe API call that I can use in a functions.php filter to change/override the default customer ID format?
Thanks!
Alison
- The topic ‘Code Snippet to Override Customer ID?’ is closed to new replies.