• Resolved fippy

    (@dgilfillan)


    I have problem with regard to Woocommerce System Status showing the below errors:

    Remote post: wp_remote_post() failed. Contact your hosting provider.
    Remote get: wp_remote_get() failed. Contact your hosting provider.

    Any advice on how to troubleshoot would be appreciated as the error message is pretty vague. (I am the hosting provider, in that my install is hosted on AWS – I can change all settings if anyone has any advice?)

    I am running WordPress 5.2.1 with Woocommerce 3.6.3 on Nginx with PHP 7.3.5 and cURL version 7.61.1 OpenSSL/1.0.2k installed, all functioning as I would expect.

    • This topic was modified 5 years, 6 months ago by fippy.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter fippy

    (@dgilfillan)

    just to confirm cURL is enabled and php info shows:

    curl
    cURL support enabled
    cURL Information 7.61.1
    Age 4
    Features
    AsynchDNS Yes
    CharConv No
    Debug No
    GSS-Negotiate No
    IDN Yes
    IPv6 Yes
    krb4 No
    Largefile Yes
    libz Yes
    NTLM Yes
    SPNEGO Yes
    SSL Yes
    SSPI No
    Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
    Host x86_64-redhat-linux-gnu
    SSL Version OpenSSL/1.0.2k
    ZLib Version 1.2.8
    libSSH Version libssh2/1.4.2
    Directive Local Value Master Value
    curl.cainfo no value no value

    Thread Starter fippy

    (@dgilfillan)

    when I manually test the two HTTP WordPress functions, they seem to work as expected? I quickly added a test widget to the WordPress dashboard to output the results of a remote get and post request and both return the results I would expect?

    /**
     * Add a widget to the dashboard.
     *
     * This function is hooked into the 'wp_dashboard_setup' action below.
     */
    function wpexplorer_add_dashboard_widgets() {
    	wp_add_dashboard_widget(
    		'wpexplorer_dashboard_widget', // Widget slug.
    		'Test Functions', // Title.
    		'wpexplorer_dashboard_widget_function' // Display function.
    	);
    }
    add_action( 'wp_dashboard_setup', 'wpexplorer_add_dashboard_widgets' );
    
    /**
     * Create the function to output the contents of your Dashboard Widget.
     */
    function wpexplorer_dashboard_widget_function() {
    
      echo "<p>Testing wp_remote_get:<p>";
      $get_response = wp_remote_get( 'https://httpbin.org/get' );
      echo "<pre>" . $get_response ['body'] . "</pre>";
    
      echo "<p>Testing wp_remote_post:<p>";
      $post_response = wp_remote_post( 'https://httpbin.org/post' );
      echo "<pre>" . $post_response ['body'] . "</pre>";
      
    }
    • This reply was modified 5 years, 6 months ago by fippy.
    Thread Starter fippy

    (@dgilfillan)

    I’ve deleted the transients using transient manager plugin and refreshed and appears to be working now…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_remote_post() failed, wp_remote_get() failed’ is closed to new replies.