Skip to content

Instantly share code, notes, and snippets.

@EricBusch
Created July 18, 2018 16:08
Show Gist options
  • Save EricBusch/f90e0e537e58ab4fb13de1b72ce32748 to your computer and use it in GitHub Desktop.
Save EricBusch/f90e0e537e58ab4fb13de1b72ce32748 to your computer and use it in GitHub Desktop.
Fix "cURL error 60: SSL certificate problem: unable to get local issuer certificate" errors during product image import.
<?php
/**
* Disable SSL verification during the image import process.
*
* This helps to overcome the "cURL error 60: SSL certificate problem: unable to get local issuer certificate" error.
*
* @param array $args
* @param Datafeedr_Image_Importer $image_importer
*
* @return array Updated $args array
*/
function mycode_set_sslverify_to_false( $args, $image_importer ) {
$args['sslverify'] = false;
return $args;
}
add_filter( 'datafeedr_image_importer/set_response/args', 'mycode_set_sslverify_to_false', 20, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment