0
votes

I'm developing a webshop in WooCommerce (v 2.4.6). On a local machine WooCoommerce creates an order with a key and an order id.

When I put the code on a live enviroment WooCommerce doesn't create a order key and gives an error

[Wed Sep 02 11:55:55.256903 2015] [:error] [pid 42524] [client ******] PHP Fatal error:  Call to a member function get_items() on boolean in /var/www/****/wp-content/plugins/woocommerce/includes/wc-order-functions.php on line 315

At the place of the error there is this code:

$order = wc_get_order( $order_id );

if ( $order && $order->has_status( 'processing' ) && get_option( 'woocommerce_downloads_grant_access_after_payment' ) == 'no' ) {
    return;
}

if ( sizeof( $order->get_items() ) > 0 ) {

The function "wc_get_order($order_id)" gets an order after it is created and returns the order object.

So i guess WooCommerce doesn't create an order after the checkout process. Has anyone experienced this issue?

Kind regards.

1

1 Answers

0
votes

FIXED

I restarted Apache and MySQL and the problem resolved itself, weird..