UR-4832 Feat - Add "Always Show This Field" toggle in membership field advance settings - #1395
Open
MILAN88888 wants to merge 1 commit into
Open
Conversation
MILAN88888
force-pushed
the
UR-4832-add-always-show-this-field-toggle-in-membership-field
branch
2 times, most recently
from
August 18, 2026 04:28
31b2869 to
76b23f2
Compare
…d advance settings
MILAN88888
force-pushed
the
UR-4832-add-always-show-this-field-toggle-in-membership-field
branch
from
August 18, 2026 04:39
76b23f2 to
c50d356
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
https://themegrill.atlassian.net/browse/UR-4832
Adds an Always Show This Field toggle (default on) to the Membership field's Advance Settings. Turning it off hides the whole membership field on the frontend when there is only one active plan and that plan is free.
The toggle only has an effect in that case, so it is only rendered in that case - the setting resolves the field's own plan list (all / group / selected) and is registered only when it comes back as a single free plan. Otherwise the Advanced Settings section is not shown for this field at all.
Condition:
typecomes frombuild_membership_list_frontend(), which sets it from the plan meta asfree,paidorsubscription— so onlyfreecollapses; a single paid/subscription plan renders as normal.When it collapses, the outer
#ur-membership-registrationwrapper is hidden so the plan list, coupon, total and gateways go together. The plan radio stays in the DOM andchecked(not swapped for a hidden input) because the frontend JS reads the selection viainput[name="urm_membership"]:checked.Also needed to make the setting reachable:
user_registration_membership_advance_class— the loader only auto-includes from coreincludes/form/settings/, so the module's settings class never loaded and the Advanced Settings section never rendered for this field.field_namesetting —sweep_array()treats everyfield_nameas a global unique key, so it collided withgeneral_setting.field_nameand blocked form saves.#1386 (UR-4788) is left intact and is a separate layer: any lone plan still auto-selects and renders as a static summary with its radio hidden. This PR only adds the further step of hiding the field outright, and only for a lone free plan with the toggle off.
Also completes UR-4788's label rename that was missed in
class-ur-ajax.php- the auto-created default form and the "add membership field to existing form" helper still hardcoded"label":"Membership Field", so new installs got the old label even thoughdefault_labelwas alreadyMembership.Closes # .
How to test the changes in this Pull Request:
Activesubscription.Types of changes:
Other information:
Changelog entry