woogists
3/9/2018 - 4:58 PM

[Stripe] Add custom Stripe Elements styles using the `wc_stripe_elements_styling` filter.

[Stripe] Add custom Stripe Elements styles using the wc_stripe_elements_styling filter.

// Stripe provides a filter for you to add custom Stripe Elements Styling
// See full documentation from Stripe on what elements are available to be styled here:
// https://stripe.com/docs/stripe-js/reference#element-options

add_filter( 'wc_stripe_elements_styling', 'marce_add_stripe_elements_styles' );
function marce_add_stripe_elements_styles($array) {
	$array = array(
		'base' => array( 
			'color' 	=> '#bada55',
			'fontFamily' 	=> 'Comic Sans',
			'fontSize' 	=> '30px'
		),
		'invalid' => array(
			'color'		=> '#0099e5'
		)
	);
	return $array;
}