wafle_users_switch_tenant
Activates a tenant for the session so subsequent calls use it by default. Verifies the user's membership and returns it, or errors if not a member.
Instructions
Set the session's current_tenant_id so subsequent calls without an explicit /stores/<slug>/ path apply to this tenant.
Returns the membership for the tenant. Errors with wafle_users_no_membership if the user is not a member.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tenant_id | Yes | Numeric tenant id (CPT post id of the store). |