Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[Stripe] Add custom Stripe Elements styles using the `wc_stripe_elements_styling` filter. Add this to your custom child theme functions.php
// 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:
add_filter( 'wc_stripe_elements_styling', 'woogist_add_stripe_elements_styles' );
function woogist_add_stripe_elements_styles($array) {
$array = array(
'base' => array(
'color' => '#bada55',
'fontFamily' => 'Tahoma',
'fontSize' => '30px'
'invalid' => array(
'color' => '#0099e5'
return $array;
Copy link

Where this code should be placed? Help me plz.

Copy link

H-Gomez commented Sep 10, 2019

Where this code should be placed? Help me plz.

We placed this in our file that has custom functionality for Woocommerce, for example, themes/my-theme/lib/woocommerce-checkout.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment