Support » Plugin: WooCommerce » $order object in thankyou.php is empty??

  • I am using WP 3.8.1 and WC 2.1.2.

    PHP 5.3.3, MySQL 5.1, Apache 2.2

    In templates/checkout/thankyou.php, there is a statement at the beginning:

    if ( $order ) :

    However, when I test the checkout in my local machine, the $order object is empty (i.e. not an object) and therefore goes to the next “else” statement.

    I am using custom payment gateway, is it the cause of it? If not, what would cause this object to fail?

    By the way, after printing get_temp_dir, it is /tmp/, which is accessible (drwxrwxrwt.)

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Roy Ho


    Best to test with a default core gateway like BACS and see.

    Any luck?
    I have the same problem here.
    The ‘order’ object seems empty as it returns only the sentence:
    Thank you. Your order has been received.

    and I wonder why..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘$order object in thankyou.php is empty??’ is closed to new replies.