rcp_get_subscription_details()

Returns the membership level object from the database.

Parameters:

  • $id (int) - ID of the membership level to get the data of.

Return values:

  • object - Database object on success. Includes the following:
    • id (int) - ID of the membership level.
    • name (string) - Name of the membership level.
    • description (string) - Description of the membership level.
    • duration (string) - Numerical duration of the membership level. This can be combined with duration_unit to get the full billing cycle. Example: if the cycle is "1 month" then the "duration" value will be "1".
    • duration_unit (string) - Duration unit - day, month, or year.
    • price (string) - Base price of the membership level.
    • fee (string) - Extra fee to charge at signup.
    • list_order (int) - Numerical representation of where this level should appear on the registration form (lower numbers appear first).
    • level (int) - Access level granted when a customer is a member of this level.
    • status (string) - Status of the membership level - either "active" or "inactive". Only active membership levels appear in the [register_form] shortcode.
    • role (string) - Slug of the role granted to members of this level.
    • trial_duration (int) - Numerical duration of the free trial. Will be 0 if there is no free trial. This can be combined with trial_duration_unit to get the full billing cycle. Example: if the trial is "1 month" then the "trial_duration" value will be "1".
    • after_final_payment (string) - Action to take after the final payment for payment plans.
    • maximum_renewals (int) - Maximum number of renewal payments (for payment plans).