• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Stripe Plugins

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • My Downloads
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Topics / Form defaults / parameters

[Resolved] Form defaults / parameters

· ·

Home › Forums › Stripe Payments Plugin › Form defaults / parameters

This topic contains 3 replies, has 3 voices, and was last updated by  apps@ascension.one 1 month, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 8, 2020 at 2:17 pm #3451

    apps@ascension.one
    Participant

    Hi guys,

    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).

    Thanks!

    December 9, 2020 at 12:22 am #3453

    Admin
    Keymaster

    We should be able to add filter hooks for this. I will look into this.

    December 10, 2020 at 6:06 pm #3455

    alexanderfoxc
    Keymaster

    Hi.

    You can change customer name and donation amount by hooking to asp-button-output-data-ready filter.

    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

    December 11, 2020 at 1:35 pm #3462

    apps@ascension.one
    Participant

    Excellent, Alexander – this is basically exactly what I was looking for. Cheers guys!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Primary Sidebar

Search

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay and Google Pay

Addon Bundle

Stripe Payments Addon Bundle

Support Links

  • Support Forum
  • Forum Registration

Copyright © 2021 | Stripe Plugins | A member of the Tips and Tricks HQ family.