• Resolved Evan Mattson

    (@aaemnnosttv)


    Getting this error with v1.0.4 using WC 3

    PHP Fatal error: Uncaught Error: Call to a member function get_total() on boolean in /.../plugins/adroll-for-woocommerce-stores-dev/dynamic_smart_pixel.php:18

    The problem is on the previous line where it checks for the order <?php if (isset($order)): ?> as the conditional will evaluate to true for anything other than null.

    $order = wc_get_order($order_id) is likely evaluating to false which is why this is failing.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve just received this error as well – is there a specific resolution to this issue?

    Plugin Contributor aaj2006

    (@aaj2006)

    @aaemnnosttv Looks like you’re right. Perhaps $order_id was null which caused wc_get_order to return false. Nice catch.

    As for a fix, I recommend upgrading to the latest version of the plugin, since we did a massive rewrite for 2.0.0. All version before 2.0.0 should be considered obsolete at this point, and we currently have no plans to continue supporting them.

    If you find the same bug in the newer versions (or any other bugs for that matter), don’t hesitate to report them! We really appreciate you taking the time to bring this to us.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error “Call to a member function get_total() on boolean”’ is closed to new replies.