• Resolved jezthomp

    (@jezthomp)


    I am enqueuing my fonts like so…

    wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap', false ); 
    

    However, when i go to OMGF and save changes i get the following error…?

    OMGF encountered an error while downloading Google Fonts: http_request_failed - cURL error 51: SSL: no alternative certificate subject name matches target host name 'my-site.co.uk'

    Te site currently doesn’t have an SSL, is that a requirement for it to work?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Recent version of WordPress verify the SSL certificate by default when making get requests.

    But, you know what, in a next release I’ll force disable it. I guess I underestimated how many people this would bother.

    That being said, it’s pretty easy to generate a Let’s Encrypt certificate isn’t it?

    Thread Starter jezthomp

    (@jezthomp)

    I’m building locally at first on MAMP and unsure whether the client will want an SSL at the final point, does that mean cannot use this plugin until there is an SSL associated?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi again,

    Developers should disable SSL verification in WordPress using a custom plugin. I add the following the code in a custom plugin on my local machine:

    
    function disable_sslverify( $params, $url )
    {
    	$params['sslverify'] = false;
    	
    	return $params;
    }
    add_filter( 'http_request_args', 'disable_sslverify', 10, 2 );
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Google Fonts: http_request_failed – cURL error 51’ is closed to new replies.