title: Hide Coupons Based on Products in Basket
body: <p>I'm trying to develop a small piece of code that builds upon the WooCommerce Subscription &amp; All Products for WooCommerce Subscriptions plugins that hide/shows the coupon option at Checkout depending on whether the customer has chosen a subscription or one-time purchase.</p>
  <p>From reading online I've managed to create code that hides the coupon box for all checkout users, but it lacks the functionality of checking whether the basket is a subscription or not.</p>
  <p>Here's the code so far:</p>
  <pre><code>function hide_coupon_field( $enabled ) {
  
  if ( is_checkout() ) {
      $enabled = false;
  }
  
  return $enabled;
  }
  add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field' );
  </code></pre>
  <p>The documentation for All Products for WooCommerce Subscriptions doesn't appear to be very in-depth and so I'm unsure what, if any, functions are available to check the basket type.</p>
  <p>Thanks</p>