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

Payments Plugin for Stripe

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
    • License Key
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
    • Email Support for Customers
  • Contact Us
  • Show Search
Hide Search
You are here: Home

canerk

  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 11, 2021 at 10:09 pm in reply to: Form defaults / parameters #3619
    canerk
    Participant

    Hey alexanderfoxc,

    I have a question regarding prefilling the user data using the GET method. Before the payment, I make the user fill out a form with email, phone and name info. On the payment screen, I don’t want them to reenter their name and email. So I want to send the name and email info like “site.com/payment-screen?name=John&[email protected]”

    I added a few lines of code to the code you shared earlier to prefill the name and email with the GET data.

    
    // Get the URL parameters assign variables
    if (isset($_GET['NAME'])) {
        $s_name = $_GET['NAME'];
    } else {
    	$s_name = "failed to get post parameter";
    }
    if (isset($_GET['EMAIL'])) {
        $s_email = $_GET['EMAIL'];
    } else {
    	$s_email = "failed to get post parameter";
    }

    and changed the code you shared to:

    public function handle_data_ready( $data ) {
    		$data['customer_email'] = $s_email;
    		$data['customer_name']  = $s_name;
    		return $data;
    	}

    But it’s not working. I didn’t have high hopes anyways with my little knowledge of PHP. But I was wondering if you had a solution for this.

    My next solution might be to try to auto-register the user after filling out the form so the name and email get filled from user info.

    Thank you!

  • Author
    Posts
Viewing 1 post (of 1 total)

Primary Sidebar

Featured Addons and Extensions

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

Addon Bundle

Stripe Payments Addon Bundle

A Simple & Lightweight Plugin

Our Philosophy with the Plugin

Support Links

  • Support Forum
  • Support Contact

Search

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