@jerad
To hide certain products on the WooCommerce cart page, you can use custom code or a plugin. Here are steps to achieve this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
add_filter( 'woocommerce_cart_item_visible', 'hide_specific_products_from_cart', 10, 2 ); function hide_specific_products_from_cart( $visible, $cart_item_key ) { // Replace '123' with the ID of the product you want to hide $product_id = 123; $cart = WC()->cart->get_cart(); if ( isset( $cart[ $cart_item_key ]['product_id'] ) && $cart[ $cart_item_key ]['product_id'] === $product_id ) { $visible = false; } return $visible; } |
These methods will allow you to hide certain products from the WooCommerce cart page based on your requirements.