Cross-sells still showing twice

Hi there. I’m using the brand new X Theme 8.0.10 and Cornerstone 5.0.10 and my Cross-sells are still suddenly being duplicated on my cart page, even though the theme’s changelog reports that problem fixed.

Also, the user-suggested line of code in forum thread Duplicated display of cross-sells on cart page (solution included) doesn’t work either.

This started happening when updating X theme and Cornerstone.

I’m using Wordpress 5.6, Woocommerce 4.8.0. Please just double check the code you guys have put out. I don’t think it’s on my end. Thanks so much!

Hello @a101web,

Thanks for posting in!

The code you were talking about has been added in /framework/functions/plugin/woocommerce.php on line 311:

// Cross Sells (Cart Only)
// =============================================================================

function x_woocommerce_output_cross_sells() {
  if ( x_get_option( 'x_woocommerce_cart_cross_sells_enable' ) == '1' ) {
    $count   = x_get_option( 'x_woocommerce_cart_cross_sells_count' );
    $columns = x_get_option( 'x_woocommerce_cart_cross_sells_columns' );

    woocommerce_cross_sell_display( $count, $columns, 'rand' );
  }
}

remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
add_action( 'woocommerce_cart_collaterals', 'x_woocommerce_output_cross_sells', 21 );

If it is not in your current installed version, please re-install your X theme. You may need to go to Appearance > Themes and delete the X theme. You can then upload a fresh copy of the X theme. Use the Theme Options Manager in X > Validation screen to backup your theme option settings.

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.