예제 #1
0
function et_shop_cart_link_fragment($fragments)
{
    global $woocommerce;
    ob_start();
    et_shop_cart_link();
    $fragments['a.cart-contents'] = ob_get_clean();
    return $fragments;
}
예제 #2
0
function et_shop_header_cart()
{
    if (is_woocommerce_activated()) {
        ?>
    <ul class="site-header-cart menu">
      <li<?php 
        echo is_cart() ? ' class="current-menu-item"' : '';
        ?>
><?php 
        et_shop_cart_link();
        if (!is_cart()) {
            the_widget('WC_Widget_Cart', 'title=');
        }
        ?>
      </li>
    </ul>
  <?php 
    }
}