Skip to content

Commit

Permalink
Remove undefined variable in wcct_cart_button and hide widget on mobi…
Browse files Browse the repository at this point in the history
…le devices
  • Loading branch information
svenauhagen committed Jul 5, 2016
1 parent 01c0515 commit b9e2f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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 Down Expand Up @@ -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 b9e2f03

Please sign in to comment.