PHP Fatal Error: Call to member function add() on null
-
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?
- The topic ‘PHP Fatal Error: Call to member function add() on null’ is closed to new replies.