title: WooCommerce - Don't display cross sells products which are out of the stock on cart page
body: <p>My theme displays cross sell products on cart page which is fine.</p>
  <p>This is done via the code below which can be found in the <code>cart/cross-sells.php</code> template file.</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php foreach ( $cross_sells as $cross_sell ) : ?&gt;
  
      &lt;?php
          $post_object = get_post( $cross_sell-&gt;get_id() );
  
          setup_postdata( $GLOBALS['post'] =&amp; $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
  
          wc_get_template_part( 'content', 'product' );
      ?&gt;
  
  &lt;?php endforeach; ?&gt;
  </code></pre>
  <hr />
  <p>But I dont want to display products which are out of the stock</p>
  <p>I managed to change number of columns for cross sells etc but i cant find anywhere some snippet that displays only available products.</p>
  <p>Can someone walk me through how to do that?</p>