At times you might want to avoid certificate checking when developing a WordPress application. This could especially be true when you are developing on localhost or in a development environment where HTTPS is available but it’s using a self-signed certificate.
WP-Http calls will fail and it will be difficult to see under the hood what’s happening if this occurs.
Use this command to turn off SSL validation:
add_filter( 'https_ssl_verify', '__return_false' );