Support

Home Forums Event Espresso Premium Display Event cart ICON only when not empty Reply To: Display Event cart ICON only when not empty

Reply To: Display Event cart ICON only when not empty

Author Replies
Tony # Posted on May 8, 2018 at 3:01 am

Hi there,

for the above you can use something like:

function tw_ee_add_custom_styles() {

  $cart = EE_Registry::instance()->SSN->cart();

  if( $cart instanceof EE_Cart && $cart->all_ticket_quantity_count() == 0 ) {
      echo '<style type="text/css">#cart-row{display:none}';
  }

}
add_action( 'wp_head', 'tw_ee_add_custom_styles', 10 );

Add that to a custom functions plugin on your site, we have some documentation on creating one (if you haven’t done so already) here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Do NOT follow this link or you will be banned from the site!