Disable cart hyperlinks for hidden products.

This commit is contained in:
Manos Psychogyiopoulos 2012-06-28 18:41:18 +03:00
parent ea409a4310
commit 3e97cc3ef1
1 changed files with 5 additions and 2 deletions

7
templates/cart/cart.php Normal file → Executable file
View File

@ -49,8 +49,11 @@ global $woocommerce;
<!-- Product Name -->
<td class="product-name">
<?php
printf('<a href="%s">%s</a>', esc_url( get_permalink( apply_filters('woocommerce_in_cart_product_id', $values['product_id'] ) ) ), apply_filters('woocommerce_in_cart_product_title', $_product->get_title(), $values, $cart_item_key ) );
if ( !$_product->is_visible() || ( get_post_meta( $_product->id, '_visibility', true ) == 'hidden' ) )
echo apply_filters('woocommerce_in_cart_product_title', $_product->get_title(), $values, $cart_item_key );
else
printf('<a href="%s">%s</a>', esc_url( get_permalink( apply_filters('woocommerce_in_cart_product_id', $values['product_id'] ) ) ), apply_filters('woocommerce_in_cart_product_title', $_product->get_title(), $values, $cart_item_key ) );
// Meta data
echo $woocommerce->cart->get_item_data( $values );