Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    Try this:
    edd_get_cart_contents()

    Thread Starter rgilman

    (@rgilman)

    Great!

    There may be a simpler way to do it, but the following code works in Widget Logic:
    $cartNotEmpty = false; if(edd_get_cart_contents()) $cartNotEmpty = true; return $cartNotEmpty;

    edd_get_cart_contents() by itself doesn’t work.

    The widget doesn’t show up without a page refresh. Ajax for this would be nice, but I can live with this as is. I mainly want the widget to follow the user if they go to other pages before checkout.

    Thanks for your quick reply.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide widget when cart is empty?’ is closed to new replies.