Skip to content

Instantly share code, notes, and snippets.

@mikeyarce
Last active January 31, 2018 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeyarce/56a11ec285de4c53a693f80f05af884b to your computer and use it in GitHub Desktop.
Save mikeyarce/56a11ec285de4c53a693f80f05af884b to your computer and use it in GitHub Desktop.
Stripe custom elements styles
// Remove this top line if your file already has one
<?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:
// 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment