If the cart shortcode is used on checkout, hide the totals area

This commit is contained in:
Mike Jolley 2016-06-27 11:42:50 +01:00
parent f3932e1c9e
commit 6898a79005
1 changed files with 10 additions and 4 deletions

View File

@ -1314,6 +1314,9 @@ if ( ! function_exists( 'woocommerce_cart_totals' ) ) {
* @subpackage Cart
*/
function woocommerce_cart_totals() {
if ( is_checkout() ) {
return;
}
wc_get_template( 'cart/cart-totals.php' );
}
}
@ -1328,11 +1331,14 @@ if ( ! function_exists( 'woocommerce_cross_sell_display' ) ) {
* @param string $orderby (default: 'rand')
*/
function woocommerce_cross_sell_display( $posts_per_page = 2, $columns = 2, $orderby = 'rand' ) {
if ( is_checkout() ) {
return;
}
wc_get_template( 'cart/cross-sells.php', array(
'posts_per_page' => $posts_per_page,
'orderby' => $orderby,
'columns' => $columns
) );
'posts_per_page' => $posts_per_page,
'orderby' => $orderby,
'columns' => $columns
) );
}
}