• Resolved pyramusnl

    (@pyramusnl)


    There is an issue using Nelio in combination with WooCommerce 2.1
    In your code, you are using the function wc_get_order(), which only exists in WC 2.2+. In WC 2.1 this will lead to a fatal error.

    I’ve fixed this by replacing
    $order = wc_get_order( $order_id );
    with
    $order = new WC_Order( $order_id );
    on line 166 of the file /includes/admin/woocommerce/woocommerce-support.php

    Of course, this is not quite optimal and should be part of a conditional check on WC version. Hope this helps you fixing this issue.

    https://ww.wp.xz.cn/plugins/nelio-ab-testing/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi!

    Thanks again for reporting the issue. I’ve implemented the fix as follows:

    if ( function_exists( 'wc_get_order' ) ) {
      $order = wc_get_order( $order_id );
    } else {
      $order = new WC_Order( $order_id );
    }

    I’ll include it in the next release of our plugin.

    Thanks for your help one more time!

    Regards,
    David

    Thread Starter pyramusnl

    (@pyramusnl)

    Great that’s perfect!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘issue with WooCommerce 2.1’ is closed to new replies.