Disable cart hyperlinks for hidden products.
This commit is contained in:
parent
ea409a4310
commit
3e97cc3ef1
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue