Created
July 18, 2018 16:08
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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