Merge pull request #3835 from tivnet/master
Fix product links in Cart when no variation
This commit is contained in:
commit
99500160ba
|
@ -64,7 +64,7 @@ do_action( 'woocommerce_before_cart' ); ?>
|
|||
if ( ! $_product->is_visible() )
|
||||
echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key );
|
||||
else
|
||||
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', add_query_arg( $cart_item['variation'], $_product->get_permalink() ), $_product->get_title() ), $cart_item, $cart_item_key );
|
||||
echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', ( $cart_item['variation'] ? add_query_arg( $cart_item['variation'], $_product->get_permalink() ) : $_product->get_permalink() ), $_product->get_title() ), $cart_item, $cart_item_key );
|
||||
|
||||
// Meta data
|
||||
echo $woocommerce->cart->get_item_data( $cart_item );
|
||||
|
|
|
@ -813,7 +813,7 @@ endif;
|
|||
* Returns the main instance of WC to prevent the need to use globals.
|
||||
*
|
||||
* @since 2.1
|
||||
* @return object WooCommerce
|
||||
* @return WooCommerce
|
||||
*/
|
||||
function WC() {
|
||||
return WooCommerce::instance();
|
||||
|
|
Loading…
Reference in New Issue