Skip to main content

Subscription

For loop type woo_subscription, here are the query parameters and fields.

Query parameters

  • customer_id - User ID
    Type: number, string

  • order - Order
    Type: string - Default: desc

  • orderby - Order by
    Type: string - Default: name

  • product_id - The post ID of a WC_Product_Subscription, WC_Product_Variable_Subscription or WC_Product_Subscription_Variation object
    Type: number

  • status - Status
    Type: string, array - Default: active,cancelled,expired

  • user - User ID, name, or "current"
    Type: number, string

  • user_id - User ID, name, or "current"
    Type: number, string, array

Fields

  • billing_interval - Get billing interval

  • billing_period - Get billing period

  • completed_payment_count - Get the number of payments completed for a subscription

  • date_completed - Get date_completed

  • date_created - Date created

  • date_paid - Get date_paid prop of most recent related order that has been paid

  • date_to_display - Returns a string representation of a subscription date in the site's time (i.e. not GMT/UTC timezone)

  • date_trial_end - Trial End

  • end - Subscription end

  • failed_payment_count - Get the number of payments failed

  • formatted_line_subtotal - Gets line subtotal - formatted for display

  • formatted_order_total - Gets order total - formatted for display

  • id - ID

  • items - Return an OrderItem Loop of items within this subscription

  • last_order_date_created - Last order date created

  • next_payment - Next payment

  • status - Status

  • subscriber - Returns a Loop with the corresponding subscribed user

  • subtotal_to_display - Gets subtotal - subtotal is shown before discounts, but with localised taxes

  • suspension_count - Get suspension count

  • switch_data - Get the switch data

  • total_initial_payment - Returns the total amount charged at the outset of the Subscription

  • trial_period - Get trial period