|
/ Documentation /Features/ How to Pre-Fill the Checkout Fields via URL Parameters?

How to Pre-Fill the Checkout Fields via URL Parameters?

CartFlows now includes a feature to pre-fill checkout fields by passing customer information through URL parameters. After many requests, we have integrated this functionality directly into CartFlows to help you streamline the checkout experience and boost conversions.

How It Works

This feature is enabled by default in CartFlows. To use it, simply send the customer data as URL parameters to your CartFlows Checkout page. The fields will automatically be populated with the provided values when the page loads.

Important: This feature only works on the CartFlows Checkout page and will not function on any other page.

How to Use URL Parameters for Pre-Filling

You can use any contact form or external source that can redirect or link to your checkout page with URL parameters appended.

For example, if you want to pre-fill the customer’s first name and email address, your checkout page URL should look like this:

https://yourdomain.com/checkout-page/?billing_first_name=John&[email protected]

Supported Field Names

Below is the list of billing and shipping field names you can use in the URL parameters to pre-fill the checkout fields.

List of Billing Fields

  • billing_email
  • billing_first_name
  • billing_last_name
  • billing_phone
  • billing_address_1
  • billing_address_2
  • billing_city
  • billing_postcode
  • billing_country
  • billing_state
  • billing_company

List of Shipping Fields

  • shipping_email
  • shipping_first_name
  • shipping_last_name
  • shipping_phone
  • shipping_address_1
  • shipping_address_2
  • shipping_city
  • shipping_postcode
  • shipping_country
  • shipping_state
  • Shipping_company

Disabling the Pre-Fill Feature

If you prefer to disable this feature, you can do so by adding the following code snippet to your child theme’s functions.php file. This will disable the pre-fill functionality on all CartFlows Checkout pages:

add_filter( 'cartflows_auto_prefill_checkout_fields', '__return_false' );

To use the above code, please refer to this documentation on how to safely add custom PHP code to your WordPress site.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Free Cartflows Form - Popup

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.