How to make a plugin with a simple API that other plugins can use for queries

Question

I’m curious if there is a way to request information from a plugin. For example I have two plugins I’ve written that incorporate costs for very different features, yet when it comes time for billing, I’d like one plugin to query the others for what is due and present one total from both plugins.

I’ve read the https://codex.wordpress.org/Plugin_API which seems to revolve around the WP core API but it isn’t immediately clear to me if interaction is possible between plug-ins and what the proper way to do this is.

I could just have one plugin access the other plugins database table and compute it directly, but I was curious if that’s the recommended method or if there is a better way. Should I just use an ajax call to the second plugin instead?

Thanks

0
user6972 2 months 0 Answers 10 views 0

Leave an answer