Guest User

Untitled

a guest
Jul 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Disable SSL verification during the image import process.
  5. *
  6. * This helps to overcome the "cURL error 60: SSL certificate problem: unable to get local issuer certificate" error.
  7. *
  8. * @param array $args
  9. * @param Datafeedr_Image_Importer $image_importer
  10. *
  11. * @return array Updated $args array
  12. */
  13. function mycode_set_sslverify_to_false( $args, $image_importer ) {
  14. $args['sslverify'] = false;
  15.  
  16. return $args;
  17. }
  18.  
  19. add_filter( 'datafeedr_image_importer/set_response/args', 'mycode_set_sslverify_to_false', 20, 2 );
Add Comment
Please, Sign In to add comment