fatal error when viewing Affiliate profile.

Posted in

Hi,

We are seeing a fatal error when viewing affiliate profile page I have put together for our affiliates.

This is just an inquiry , seeking an explanation or pointer to what could be a reason.

Here is the message:

Fatal error: Uncaught Exception: Invalid order. in /homepages/34/d682709062/htdocs/snac/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php:86 Stack trace: #0 /homepages/34/d682709062/htdocs/snac/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(143): Abstract_WC_Order_Data_Store_CPT->read(Object(WC_Order)) #1 /homepages/34/d682709062/htdocs/snac/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(109): WC_Data_Store->read(Object(WC_Order)) #2 /homepages/34/d682709062/htdocs/snac/wp-content/plugins/affiliates-woocommerce-views-master/affiliates-woocommerce-views.php(99): WC_Abstract_Order->__construct(‘244’) #3 /homepages/34/d682709062/htdocs/snac/wp-includes/shortcodes.php(345): Affiliates_WooCommerce_Views::affiliates_woocommerce_orders(”, ”, ‘affiliates_wooc…’) #4 [internal function]: do_shortcode_tag(Array) #5 /homepages/34/d682709062/htdocs/snac/wp-includes/shortcodes.php(223): preg_replace_callback(‘/\\[(\\[?)(affili…’, ‘do_shortcode_ta…’ in /homepages/34/d682709062/htdocs/snac/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-data-store-cpt.php on line 86

— end of message.

It occurs as i am attempting to show affiliates_ woo commerce orders.

Please advise.

thanks,
-Sudd.

5 Responses to fatal error when viewing Affiliate profile.

  1. Sudd June 2, 2017 at 6:28 pm #

    Thanks for the fix. It resolved the issue.

    Best,
    -Sudd.

  2. Sudd May 31, 2017 at 2:35 am #

    i looked up post id 244, found that is not an order ( purchase ). It is affiliate registration which are referrals by the OR ( id 8 ). The fatal error is occurring to the OR viewing his affiliate profile page. On that page I look for woo commerce orders for the OR.

    So, when using the shortcode [affiliates_woocommerce_orders] it tries to lookup order 244 and it should skip it as it is not an order.

    Here is the aff_referrals table entry for post id 244: Hope you can make it out id: 13 and 14.

    13 8 NULL 244 2017-05-29 01:52:16 User Registration drinkprodovite 1264313995 NULL 0 NULL NULL a:5:{s:10:”user_login”;a:3:{s:5:”title”;s:8:”Username”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:14:”drinkprodovite”;}s:10:”user_email”;a:3:{s:5:”title”;s:5:”Email”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:24:”WAS Email”;}s:10:”first_name”;a:3:{s:5:”title”;s:10:”First Name”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:5:”Scott”;}s:9:”last_name”;a:3:{s:5:”title”;s:9:”Last Name”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:10:”Vandervort”;}s:11:”base_amount”;a:3:{s:5:”title”;s:11:”Base Amount”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;N;}} accepted user NULL 16
    14 8 NULL 244 2017-05-30 04:14:07 User Registration NewMoon 2920741662 NULL 0 0.3 USD a:5:{s:10:”user_login”;a:3:{s:5:”title”;s:8:”Username”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:7:”NewMoon”;}s:10:”user_email”;a:3:{s:5:”title”;s:5:”Email”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:21:”WASEmail”;}s:10:”first_name”;a:3:{s:5:”title”;s:10:”First Name”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:14:”Hilal-Pa’lette”;}s:9:”last_name”;a:3:{s:5:”title”;s:9:”Last Name”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;s:10:”Abdul-HAQQ”;}s:11:”base_amount”;a:3:{s:5:”title”;s:11:”Base Amount”;s:6:”domain”;s:10:”affiliates”;s:5:”value”;N;}} accepted user NULL 41

    Other post I have there is for Actual Orders and order number shown in the description field..

    These 2 affiliates are referred by #8.

    Is there a issue with the affiliates install on my site?

    Looking forward to your reply.

    Thanks,
    -Sudd.

    • antonio May 31, 2017 at 7:32 am #

      Thanks Sudd,
      Please try to download this pre-1.1.0 version. Should fix this issue.
      Kind Regards,
      Antonio B.

  3. Sudd May 31, 2017 at 2:07 am #

    Thanks Antonio. I checked and no order 244.

    I will look into a check like you suggest.

    Best,
    -Sudd.

  4. antonio May 30, 2017 at 6:48 am #

    Hi Sudd,
    It seems that the order 244 does not exist, can you check it?
    Maybe you have to add some check, something like:
    if ( $order->get_order( $order_id ) ) {
    ...
    }

    Kind Regards,
    Antonio B.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share