• Resolved bdoga

    (@bdoga)


    I just installed your plugin today, it installed fine and picked up the first couple abandoned carts fine, but then after a bit longer I checked the reports page and I had the following error:
    Fatal error: Call to a member function add() on null in /.../.../.../wp-content/plugins/wc-abandoned-carts-by-small-fish-analytics/admin/tables/class-sfa-abandoned-carts-abandoned-product-table.php on line 27

    The line of code appears to be:
    $this->sorted_data[$cart_item['data']->id]->add($cart_item['line_total'] + $cart_item['line_tax'], $cart_item['quantity']);

    so it appears that either the amount or quantity are coming across as null for some reason, or the sorted_data object is null? Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author smallfishes

    (@smallfishes)

    Hi bdoga

    Sorry you’re having issues. I’m more than happy to help and figure out a fix.

    Can you confirm what version of WooCommerce you’re using?

    Plugin Author smallfishes

    (@smallfishes)

    Also if you’re comfortable sharing your abandoned carts data could you export the table wp_sfa_abandoned_carts from your database and send it to me at [email protected]?

    It’ll be a bit easier to work backwards if I can start with the data you have.

    Thread Starter bdoga

    (@bdoga)

    Here are some of the site specs from the Woocommerce Status I will email over an export of the database.

    WC Version: 3.0.7
    WP Version: 4.7.5
    Language: en_US

    ### Server Environment ###

    Server Info: Apache
    PHP Version: 5.6.30

    MySQL Version: 5.6.35
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?

    Thanks

    Plugin Author smallfishes

    (@smallfishes)

    Thanks. I got the data.

    Since it’s WooCommerce 3.0 I can’t use the data as easily as I used to be able to to troubleshoot because the products don’t exist in my database.

    Do you happen to have Skype that you can email me so we can chat? I just have a few specific questions and then I’ll try and send you a test version of the plugin to see if it fixes your problem.

    The good news is the data all seems to be there so once it’s patched you should be good to go.

    Thread Starter bdoga

    (@bdoga)

    Thanks, the updated plugin that you sent over fixed the issue. I appreciate your help with this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Fatal Error: Call to member function add() on null’ is closed to new replies.