• Hi,

    if “Google fonts from site” option is enabled WooCommerce Payments Stripe credit card field don’t display correct font. (in my case is Poppins) https://postimg.cc/bdQn9MsK

    If disable it font in credit card field are display correct.

    How to solve?

    Thanks

Viewing 1 replies (of 1 total)
  • Hello @vincenzoquarta,

    Technically, all payment gateways are iframes; typically, all styling comes from APIs. Depending on the plugin you are using, you can refer to the plugin’s documentation for more information.

    However, for Stripe, you can add the following function to the child theme to set your desired style:

    function my_theme_modify_stripe_fields_styles( $styles ) {
        return array(
            'base' => array(
                'fontFamily'      	=> 'Rubik',
            ),
        );
    }
    
    add_filter( 'wc_stripe_elements_styling', 'my_theme_modify_stripe_fields_styles' );

    Additionally, you can follow the steps explained in this link: https://woocommerce.com/document/stripe-styling-fields/

    You can use your desired font family on the function above.
    Also, for more information about the child theme, please follow this link: https://docs.oceanwp.org/article/90-sample-child-theme.

    I hope it helps.

    Best Regards

    • This reply was modified 1 year, 8 months ago by Shahin.
Viewing 1 replies (of 1 total)
  • The topic ‘Using Google Fonts hosted locally in Stripe credit card field’ is closed to new replies.