• Resolved Damiane Muller

    (@damianem)


    I’m trying to add a Google font to the Stripe payment iframe that is loaded for card details in the updated checkout experience using the ‘wc_stripe_upe_params’ filter, but I haven’t been able to get it to work.

    I’ve tried the following –

    add_filter( 'wc_stripe_upe_params', function ( $stripe_params ) {    
    
        $stripe_params['fonts'] = [
            'family' => 'Montserrat',
            'src' => 'url("https://fonts.googleapis.com/css?family=Montserrat:400,500")'
        ];
    
        $stripe_params['appearance'] = (object) [
            'variables' => [
                'fontFamily' => 'Montserrat',
            ]
        ];
    
        return $stripe_params;
    } );

    The CSS in the iframe is now trying to load Montserrat, but the font is clearly not available.

    Has anyone been able to add a custom font successfully using the filter?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.