Skip to content

Commit

Permalink
Merge pull request #29 from svenauhagen/master
Browse files Browse the repository at this point in the history
Remove undefined variable  in wcct_cart_button and hide widget on mob…
  • Loading branch information
jameskoster authored Jul 6, 2016
2 parents 01c0515 + 0919982 commit 74b5e5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cart-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function woocommerce_cart_tab() {
}

if ( ! is_cart() && ! is_checkout() ) {
if ( 'yes' == $widget ) {
if ( 'yes' == $widget && !wp_is_mobile() ) {
echo '<div class="' . esc_attr( $position ) . ' cart-tab ' . esc_attr( $skin ) . ' ' . esc_attr( $visibility ) . '">';
} else {
echo '<div class="' . esc_attr( $position ) . ' cart-tab no-animation ' . esc_attr( $skin ) . ' ' . esc_attr( $visibility ) . '">';
Expand All @@ -181,7 +181,7 @@ function woocommerce_cart_tab() {
wcct_cart_button();

// Display the widget if specified.
if ( 'yes' == $widget ) {
if ( 'yes' == $widget && !wp_is_mobile() ) {
// Check for WooCommerce 2.0 and display the cart widget.
if ( version_compare( WOOCOMMERCE_VERSION, '2.0.0' ) >= 0 ) {
the_widget( 'WC_Widget_Cart', 'title=' );
Expand All @@ -203,7 +203,7 @@ function wcct_cart_button() {
global $woocommerce;
$link_total = get_option( 'wc_ct_link_display_total' );
?>
<a href="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'woocommerce-cart-tab' ); ?>" class="cart-parent <?php echo esc_attr( $visibility ); ?>">
<a href="<?php echo esc_url( $woocommerce->cart->get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'woocommerce-cart-tab' ); ?>" class="cart-parent">
<?php
if ( 'total' == $link_total ) {
echo wp_kses_post( $woocommerce->cart->get_cart_total() );
Expand Down

0 comments on commit 74b5e5d

Please sign in to comment.