You are here: / / Form defaults / parameters
I have already read that it is currently not possible to pre-populate fields with custom or default values in the payment form … which is what is most needed on our end to have a more seamless business logic though. Especially predefine name & email, but also eg. a suggested donation value.
It seems though like there are plans for that? Do you guys have any roadmap? I guess all that could even be a form-defaults action hook for setting default values (which could be safer than just via get params).
We should be able to add filter hooks for this. I will look into this.
You can change customer name and donation amount by hooking to
Here’s quick example how to change customer name: https://github.com/Arsenal21/stripe-payments-enhancements/blob/master/asp-prefill-customer-name-and-email/asp-prefill-customer-name-and-email.php
You can change donation amount like this:
$data['item_price'] = 10000; //amount should be in cents
Excellent, Alexander – this is basically exactly what I was looking for. Cheers guys!
You must be logged in to reply to this topic.