Skip to content

Improved condition handling#627

Open
girishpanchal30 wants to merge 3 commits into
developmentfrom
bugfix/pro/714
Open

Improved condition handling#627
girishpanchal30 wants to merge 3 commits into
developmentfrom
bugfix/pro/714

Conversation

@girishpanchal30

@girishpanchal30 girishpanchal30 commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Removed all ppom-locked-* classes from the conditional fields when setting the rule for any matches. This will make sure that the fields will be shown when any of the conditions are matched.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/ppom-pro/issues/714

@girishpanchal30 girishpanchal30 requested a review from Copilot May 28, 2026 09:07
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label May 28, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label May 28, 2026
@pirate-bot

pirate-bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Tip

You can preview the changes in the Playground

Plugin build for c4d08b6 is ready 🛎️!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts PPOM’s conditional-logic behavior so fields configured with bound: Any don’t remain “locked” once any rule matches, and it also normalizes PPOM_Meta::inline_js() to return an empty string instead of null when no meta/settings exist.

Changes:

  • Update conditional-logic evaluation for bound === 'Any' to clear ppom-locked-* classes when rules match.
  • Normalize inline_js() early returns from null to '' for more consistent string handling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
js/ppom-conditions-v2.js Updates Any binding handling by removing ppom-locked-* classes when conditions match.
classes/ppom.class.php Changes inline_js() early returns from null to ''.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread js/ppom-conditions-v2.js Outdated
Comment thread js/ppom-conditions-v2.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants