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

#11 Add support for WP Centric's P2P plugin #12

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

fembuelita
Copy link

@fembuelita fembuelita commented May 13, 2022

Adds basic support for WP Centric's P2P plugin. I've tested this on our application using that plugin and it's working, but we only have a few P2P fields and we're not using Tax or User fields. (Posts/pages/custom post types only). Works fine for those, but YMMV.

Addresses #11

Improve dependency checker by using `is_plugin_active` for WPGraphQL instead of checking if the class exists. Also allow two variants for P2P plugin (WP Centrics & Scribu). Add Helper function for plugin to determine which plugin is in use
Most of the instances are not compatible with the WPCentrics version of P2P. Disable these if that plugin is in use
Now limiting results to matching connection ID
Set value to 'any' rather than looking up 'any' in the `$args` param
@fembuelita
Copy link
Author

I've updated this just now for support with the latest version, FYI.

Returns null instead of false for the `get_p2p_plugin_variant` to support older versions of PHP
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.

1 participant