We are introducing a new feature to pre-fill the checkout fields via sending contact information from URL parameters. After many requests, we decided to integrate it in the CartFlows, and in this article, we will see how to set it up and how to use it.
So, let’s begin…
This feature is enabled by default in the CartFlows. So, you just need to send the parameters from the URL on the checkout page to pre-fill the checkout fields on the CartFlows checkout page.
Remember, this feature works on the CartFlows Checkout page and not on any other page.
To send the values from the URL parameters, you can use any contact form to send the values in the URL after successful submission.
Now, while using the contact form or any other medium you need to ensure that to create a proper checkout page URL so that your data will be automatically pre-filled on the CartFlows Checkout page.
For example, If you want to send the user’s email address, first name then your checkout page URl should be created as follows:
There are few fields names which you can use to send the data in the URL to capture it on the CartFlows Checkout page and they are listed below.
List of Billing Fields
List of Shipping Fields
If you don’t want to use this feature then we also have provided a filter to disable this feature on the CartFlows Checkout page. Please note that disabling this feature using the filter will disable it from all the available checkout pages.
Below is the code which you can use to disable this feature. After copying this code you have to add it in your child theme’s functions.php file at the very end of it.
add_filter( 'cartflows_auto_prefill_checkout_fields', '__return_false' );
This article will help you to add the custom PHP code on your website.