Remove Mandate Text
When customers choose to save their payment method during checkout, Stripe displays mandate text that explains the terms for future charges. This text appears as legal language informing customers that they're authorizing your business to charge their saved payment method according to your terms. While this provides transparency, some merchants prefer a cleaner checkout experience without this additional text.
This code example shows how to hide the mandate text that appears when customers opt to save their payment information, creating a more streamlined checkout interface while still maintaining the security and functionality of saved payment methods.
When would you use this?
Removing mandate text is useful when you want to simplify your checkout page appearance or when you have your own terms and conditions that already cover payment authorization. Some merchants prefer to handle payment terms through their existing checkout flow rather than displaying Stripe's default mandate language.
This approach is particularly valuable for stores with custom checkout designs where the standard mandate text disrupts the visual flow, or for businesses that want complete control over how payment authorization terms are presented to customers.
The Code
This example removes the mandate text that appears when customers save their payment method during checkout:
/**
* Remove mandate text from credit card payment forms
* @param array $data Localized script data for credit card payments
* @return array Modified script data with mandate text disabled
*/
add_filter('wc_stripe_localize_script_credit-card', function($data){
$data['paymentElementOptions']['terms'] = [
'card' => 'never'
];
return $data;
}, 10, 2);
How the Code Works
The code uses the wc_stripe_localize_script_credit-card
filter, which runs when the plugin prepares JavaScript configuration data for credit card payment forms. This filter allows you to modify the settings that control how Stripe's payment elements behave on your checkout page.
The function modifies the paymentElementOptions
array by setting the terms
configuration to specify that card mandate text should 'never'
be displayed. This tells Stripe's payment element to hide the authorization text that typically appears when customers choose to save their payment information.

Credit card form with mandate text visible

Credit card form with mandate text removed
Conditional Mandate Text Display
You can also conditionally control when mandate text appears based on specific criteria:
Only show mandate text for orders over $100:
add_filter('wc_stripe_localize_script_credit-card', function($data){
// Only show mandate text for orders over $100
if(WC()->cart && WC()->cart->get_total('') < 100){
$data['paymentElementOptions']['terms'] = [
'card' => 'never'
];
}
return $data;
}, 10, 2);