Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test wp_options values for notifications #3230

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

andrewlimaza
Copy link
Contributor

  • ENHANCEMENT: Added notification check for wp_option (general) option which will help for compatibility plugins AND any of our own pmpro related options that are arrays.

This has been tested with a custom JSON file, as well as various option values both single values and arrays. The structure of the JSON required follows the pmpro_setting logic and extended into non-pmpro options.

All Submissions:

* ENHANCEMENT: Added notification check for wp_option (general) option which will help for compatibility plugins AND any of our own pmpro related options that are arrays.

TODO: Test this code.
@dparker1005 dparker1005 added this to the 3.4 milestone Dec 17, 2024
@ideadude
Copy link
Member

Our original pmpro option check could only check for exact matches. It would be nice to be able to do a couple other checks:

  • empty or not
  • numerically greater than, less than, equal
  • "contains" text searches

Another nice to have would be support for serialized data. So if we stored an option called settings1 like { option1: value1, option2: value2 } we would want to be able to check settings1.option2 value.

Another nice to have is checking user meta.

This all doesn't have to be supported now, but it would be nice to have it in this version of the API ASAP since we're introducing it.

We could switch to using the new and improved wp_options check for things instead of the limited pmpro options check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants