Created
May 17, 2020 15:26
-
-
Save Musilda/c6c93b297be46328c1587c00f07f892e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
//Remove cross sells products | |
remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' ); | |
//Change cross sells columns number | |
add_filter( 'woocommerce_cross_sells_columns', 'musilda_change_cross_sells_columns' ); | |
function musilda_change_cross_sells_columns( $columns ) { | |
return 3; | |
} | |
//Change number of cross sell products | |
add_filter( 'woocommerce_cross_sells_total', 'musilda_change_cross_sells_product_number' ); | |
function musilda_change_cross_sells_product_number( $columns ) { | |
return 3; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment