Before you start
- You must already have configured the single sign-on and optionally the integration capability of the WordPress + Office 365 plugin.
- You are an Administrator for your WordPress website.
Allow developer hooks to fire
The plugin provide three hooks that developers can use to build custom integrations with Microsoft Graph or Microsoft 365 services such as SharePoint Online, Yammer, Teams that extend the out-of-the-box functionality already provided by the WPO365 plugin.
- When a user has just successfully signed in with Microsoft (action hook)
- When a user has just successfully obtained an access (bearer) token (action hook).
- When the plugin has finished analyzing reasons to skip authentication (filter hook).
To allow these three hooks to fire, an administrator must update the configuration of the WordPress website and add the following line to the wp-config.php file.
define( 'WPO_ALLOW_DEVELOPER_HOOKS', true );
/* That's all, stop editing! Happy publishing. */
If you don’t add this line or add it but set it to false, the developer hooks will not fire.
Rather than providing an extensive documentation for these three hooks, developers instead can review the samples provided below in the form of a simple WordPress plugin.
Please note that the developer hooks are provided as is and there is no support offered.