Created
June 24, 2020 16:34
-
-
Save mrwweb/bc4b8568f49baba1eb09e3f5d8381908 to your computer and use it in GitHub Desktop.
Show Hidden Products as Cross-Sells in WooCommerce Cart.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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