title: How do I fetch a specific user's subscriptions with WooCommerce Subscriptions?
body: <p><strong>Context:</strong></p>
  
  <p>Given a WordPress website with WooCommerce and WooCommerce Subscriptions, I am attempting to fetch a list of a specific user's subscriptions. Until the recent update, this one line of code has taken care of this for me. Here's is the code that I've been using:</p>
  
  <pre><code>$all_user_subscriptions = WC_Subscriptions_Manager::get_users_subscriptions( $user_id );
  </code></pre>
  
  <p>Where $user_id is a valid user's ID in WordPress.</p>
  
  <p><strong>The Problem:</strong></p>
  
  <p>We are seeing the following error frequently since the last update:</p>
  
  <p>Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Start or end times are not integers' in /home/warfarep/public_html/wp-content/plugins/woocommerce-subscriptions/includes/wcs-time-functions.php:332 Stack trace: #0 /home/warfarep/public_html/wp-content/plugins/woocommerce-subscriptions/includes/wcs-time-functions.php(309): wcs_number_of_leap_days('1456308046', 1487930566) #1 /home/warfarep/public_html/wp-content/plugins/woocommerce-subscriptions/includes/wcs-deprecated-functions.php(171): wcs_estimate_periods_between('1456308046', 1487930566, 'year', 'floor') #2 /home/warfarep/public_html/wp-content/plugins/woocommerce-subscriptions/includes/class-wc-subscriptions-manager.php(1460): wcs_get_subscription_in_deprecated_structure(Object(WC_Subscription)) #3 /home/warfarep/public_html/wp-content/themes/warfare-plugins-pro-3/functions.php(334): WC_Subscriptions_Manager::get_users_subscriptions('2686') #4 /home/warfarep/public_html/wp-content/themes/warfare-plugins-pro-3/woocommerce/myaccount/my-account.ph in /home/warfarep/public_html/wp-content/plugins/woocommerce-subscriptions/includes/wcs-time-functions.php on line 332</p>
  
  <p><strong>The Question:</strong></p>
  
  <p>If this function no longer works (is deprecated) what can I do to retrieve a list (object, array, whatever) of a specific user's subscriptions without throwing a fatal error?</p>