• Hey, I’m using wpec 3.8 and bring fraktguide 1.7

    When I put in a postal code on checkout, I get the following error message on a blank page:

    Fatal error: Cannot use object of type WP_Error as array in /home/nyta/webapps/ecom/wp-content/plugins/wp-e-commerce-bring-fraktguide/wp-e-commerce-bring-fraktguide.php on line 429

    When I deactivate weigth rate and has bring by itself, this message shows up in the styled cart.

    My site is http://www.nyta.no

    Thanks in advance for any help, pointers and input.
    Lasse

Viewing 4 replies - 1 through 4 (of 4 total)
  • wp_remote_get on line 428 returns an error after trying to contact the Bring Fraktguide API. I think wp_remote_get uses cURL. Is cURL installed on your web server?

    Put the following code between line 428 and 429 in wp-e-commerce-bring-fraktguide.php. It should display more details about the error.

    if ( is_wp_error($results) ) {
       $error_string = $result->get_error_message();
       echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
    }
    Thread Starter lastafa

    (@lastafa)

    This is the resulting error:

    Fatal error: Call to a member function get_error_message() on a non-object in /home/nyta/webapps/ecom/wp-content/plugins/wp-e-commerce-bring-fraktguide/wp-e-commerce-bring-fraktguide.php on line 430

    Thanks.

    Sorry, my bad. You must change this line:
    $error_string = $result->get_error_message();
    To this:
    $error_string = $results->get_error_message();

    Thread Starter lastafa

    (@lastafa)

    You’re fast!

    This breaks all pages, the source code for any requested page ends with:
    <div id=”message” class=”error”><p>name lookup timed out</p></div>
    <b>Fatal error</b>: Cannot use object of type WP_Error as array in <b>/home/nyta/webapps/ecom/wp-content/plugins/wp-e-commerce-bring-fraktguide/wp-e-commerce-bring-fraktguide.php</b> on line <b>433</b>

    I have to remove it no, site is live 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP e-Commerce Bring Fraktguide] Error on postal code input’ is closed to new replies.