|
/ Documentation /Code Snippets/ How to Turn Off the Auto-fill of Checkout Fields?

How to Turn Off the Auto-fill of Checkout Fields?

By default, CartFlows helps improve the checkout experience by automatically filling in previously entered billing or shipping information. This feature is designed to make it faster and easier for returning users to complete their purchase.

CartFlows stores this data locally in the user’s browser—nothing is saved on the server or shared with others. This means the information will only auto-fill for the same user using the same browser and device.

While this improves convenience, there may be scenarios where you prefer to disable this auto-fill behavior—especially on shared devices or for privacy-focused setups.

How to Disable Auto-Fill Using a Filter

To turn off the auto-fill feature, you can use the following filter in your child theme’s functions.php file:

/**
* Filter to enable/disable the auto-fill of checkout fields
*
* @param string $allow having yes/no
* @return string $allow yes or no
*/
add_filter( 'cartflows_allow_persistence', 'do_not_store_persistance_data', 10, 1 );

function do_not_store_persistance_data( $allow ){
$allow = 'no';
return $allow;
}

💡 Need help adding custom code? Here’s how to safely add code snippets to your site.

Once this filter is in place, CartFlows will no longer pre-fill any checkout field data from a user’s previous session.

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.

OSZAR »