gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
178 stars 134 forks source link

Membership Restriction Fixes: Reverting changes from PR #2572 #2726

Closed brianhogg closed 1 month ago

brianhogg commented 1 month ago

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: