It looks like themes and others have coded against having a single membership ID returned by llms_is_post_restricted_by_membership(). Showing multiple membership names is secondary to pages being restricted.
I still believe there are potential bugs here if a membership is deleted, or with the restriction IDs having invalid data (ie. ""). This will also show only a single membership link vs. an array of multiple memberships a visitor/student could be a member of to access the content.
Description
Reverts #2572
It looks like themes and others have coded against having a single membership ID returned by
llms_is_post_restricted_by_membership()
. Showing multiple membership names is secondary to pages being restricted.I still believe there are potential bugs here if a membership is deleted, or with the restriction IDs having invalid data (ie.
""
). This will also show only a single membership link vs. an array of multiple memberships a visitor/student could be a member of to access the content.Fixes #2714 and may fix #2725
How has this been tested?
Manually
Checklist:
npm run dev changelog add -- -i
and follow the prompt. See also: https://github.com/gocodebox/lifterlms/blob/trunk/packages/dev/README.md#changelog-add -->