More meaningful code.
This commit is contained in:
parent
3e97cc3ef1
commit
123d04f0e5
|
@ -49,9 +49,17 @@ global $woocommerce;
|
|||
<!-- Product Name -->
|
||||
<td class="product-name">
|
||||
<?php
|
||||
if ( !$_product->is_visible() || ( get_post_meta( $_product->id, '_visibility', true ) == 'hidden' ) )
|
||||
if ( !$_product->is_visible() )
|
||||
echo apply_filters('woocommerce_in_cart_product_title', $_product->get_title(), $values, $cart_item_key );
|
||||
else
|
||||
|
||||
else if ( $_product instanceof WC_Product_Variation ) {
|
||||
$_parent = new WC_Product( $_product->id );
|
||||
if ( !$_parent->is_visible() )
|
||||
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 ) );
|
||||
}
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue