title: How to get quantity of a WooCommerce subscription?
body: <p>I am currently developing a WordPress project and I am using WooCommerce with WooCommerce Subscriptions plugin to offer subscriptions to my users. I need help on how to get the quantity of a subscription in PHP.</p>
  
  <p>I am using this code to get subscription but I can not retrieve quantity:</p>
  
  <pre><code>$subscriptions = wcs_get_subscriptions( array(
      'customer_id'            =&gt; get_current_user_id(),
      'subscription_status'    =&gt; 'wc-active',
      'order_by'               =&gt; 'DESC',
      'subscriptions_per_page' =&gt; - 1
  ) );
  </code></pre>
  
  <p>When a user purchases a subscription, the user can select the quantity of subscriptions. So I need to get the value of this field:</p>
  
  <p><a href="https://i.stack.imgur.com/G5sRW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G5sRW.png" alt="enter image description here"></a></p>