+ should also be added Cross sell в Gutenberg block "Products" (from the theme)
Now you can display it like this. But this is a list, and we need a carousel in the theme styles. add_action( 'woocommerce_after_single_product', 'my_crossels', 20 ); function my_crossels( $limit = 2, $columns = 2, $orderby = 'rand', $order = 'desc') { global $product; $cross_sells = array_filter( array_map( 'wc_get_product', $product->get_cross_sell_ids() ), 'wc_products_array_filter_visible' ); wc_set_loop_prop( 'name', 'cross-sells' ); wc_set_loop_prop( 'columns', apply_filters( 'woocommerce_cross_sells_columns', $columns ) ); // Handle orderby and limit results. $orderby = apply_filters( 'woocommerce_cross_sells_orderby', $orderby ); $order = apply_filters( 'woocommerce_cross_sells_order', $order ); $cross_sells = wc_products_array_orderby( $cross_sells, $orderby, $order ); $limit = apply_filters( 'woocommerce_cross_sells_total', $limit ); $cross_sells = $limit > 0 ? array_slice( $cross_sells, 0, $limit ) : $cross_sells; wc_get_template( 'cart/cross-sells.php', array( 'cross_sells' => $cross_sells, // Not used now, but used in previous version of up-sells.php. 'posts_per_page' => $limit, 'orderby' => $orderby, 'columns' => $columns, ) ); }
Related suggestion: Deferred loading via Ajax of product blocks (upsells, related, cross sells etc.) and widgets - https://woodmart.canny.io/feature-requests/p/deferred-loadin…