Ejemplo n.º 1
0
    function eighteen_tags_header_cart()
    {
        if (is_woocommerce_activated()) {
            if (is_cart()) {
                $class = 'current-menu-item';
            } else {
                $class = '';
            }
            ?>
		<ul class="site-header-cart menu">
			<li class="<?php 
            echo esc_attr($class);
            ?>
">
				<?php 
            eighteen_tags_cart_link();
            ?>
			</li>
			<li>
				<?php 
            the_widget('WC_Widget_Cart', 'title=');
            ?>
			</li>
		</ul>
		<?php 
        }
    }
Ejemplo n.º 2
0
 function eighteen_tags_cart_link_fragment($fragments)
 {
     global $woocommerce;
     ob_start();
     eighteen_tags_cart_link();
     $fragments['a.cart-contents'] = ob_get_clean();
     return $fragments;
 }