Home / Admin / WP Simple Pay: Disable Stripe Payment Terms
Duplicate Snippet

Embed Snippet on Your Site

WP Simple Pay: Disable Stripe Payment Terms

Disable the automatically generated payment form mandates.

NOTE: No recommended. Some payment methods require mandates to be shown. If disabled, you must manually display mandates.

Code Preview
php
<?php
/**
 * @link https://library.wpcode.com/snippet/ro8wy3ow/
 */
add_filter(
	'simpay_payment_element_config',
	/**
	 * @param arary<string, mixed> $params Payment Element configuration.
	 * @return array<string, mixed>
	 */
	function( $config ) {
		$config['terms']['usBankAccount'] = 'never';
		$config['terms']['card'] = 'never';
		return $config;
	}
);

Comments

Add a Comment