Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.
If you need assistance with this, please reach out to our list of consultants for further assistance:
Returns the membership level object from the database.
- $id (int) - ID of the membership level to get the data of.
- 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).