Understanding State in WordPress Multisites

Here is my challenge. I have a plugin installed at the Network level. Its purpose is to add users and roles across the network based on the change in roles from a specific site on the network. Since roles are only managed at the site level, the plugin goes in and adds users and roles to the other sites as needed for our business objectives. I’ve just finished this plugin and it is working wonderfully well.

However, on one site (Site A), there are other plugins that have specific functions that I would like to automate when a new user role is created on that site (Site A). The challenge is that when the action is initiated at the other site (Site B) or at a network level, the site specific functions (Site A) are not registered.

I’m wondering how I would invoke a function on Site A, when a new user is being registered on Site B. It would seem like I some how need to get Site A to spin up recognize the plugins and their functions that are only registered on Site A.

I know this is a little more obscure functionality of WordPress, any thoughts out there on how to achieve this?

See also: Multisite functions to communicate with individual site functions

Read more here:: Understanding State in WordPress Multisites

Leave a Reply

Your email address will not be published. Required fields are marked *