Skip to content

Instantly share code, notes, and snippets.

@mrwweb
Created Jun 24, 2020
Embed
What would you like to do?
Show Hidden Products as Cross-Sells in WooCommerce Cart.
<?php
add_filter( 'woocommerce_product_is_visible', 'prefix_show_hidden_product_crosssells', 10, 2 );
function prefix_show_hidden_product_crosssells( $is_visible, $id ) {
if( is_cart() ) {
$is_visible = true;
}
return $is_visible;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment