title: WooCommerce Subscriptions get Billing Interval & ID
body: <p>I am using a stripe "wc_gateway_stripe_process_response" to get payment information.  What is needed is what is the payment interval for that product and what the user's subscription id is.   This is the code I have to date:</p>
  
  <pre><code> function woointerface_ProcessOrder($order_id) 
    {         
    $order               = new WC_Order( $order_id );                  
    $TransactionId       = $order-&gt;get_transaction_id();              
    $szOrderId           = $order-&gt;get_order_number();
  
    // Find all products associated with this order
   $order_data          = $order-&gt;get_data();                        
   $order_billing_email = $order-&gt;get_billing_email();                
   $payment_method      = $order-&gt;get_payment_method_title();         
   $PaymentDate         = $order-&gt;get_date_paid();
   $OrderNumber         = $order-&gt;get_order_number();
  
   $User      = get_user_by( 'email', $order_billing_email );             
   $FirstName = $User-&gt;first_name;
   $LastName  = $User-&gt;last_name;
   $UserId    = $User-&gt;ID;
   $PayerName = $FirstName . ' ' . $LastName;
  
    $items  = $order-&gt;get_items();
    foreach( $items as $item_id =&gt; $product )
      {   
    $ProductName         = $product-&gt;get_name();        
    $ProductId           = $product-&gt;get_product_id();  
    $PaymentAmount       = $product-&gt;get_total();     
    $ProductIndex        = wc_get_product($ProductId);
  
    if(! WC_Subscriptions_Product::is_subscription( $ProductIndex ) ) 
      continue;
  
   $UserSubscriptionId = ??
   $BillingCycle = ??
  
  
  // Store in local table.
  
   }
  </code></pre>
  
  <p>Looking for how to get the User subscription id and billing cycle for this order.</p>