Up to this point, we looked at the methods used in plugin integrations and important considerations. Now, it's time to integrate a few plugins to understand their practical usage. We are going to integrate three popular plugins to illustrate the process. Let's identify the plugins used for this integration and their functionality:
- WooCommerce: This is the most popular eCommerce plugin. The main functionality is selling physical and digital goods. These days, it's also being used for selling services, bookings, and memberships by modifying the features through addons.
- MyCred: This is a point management plugin where you can allow users to earn points by doing various tasks in a site such as commenting, viewing content, publishing content, registering on the site, and so on. Then, you can reward these users by providing benefits with the use of these points.
- BuddyPress: This is a plugin used to build online communities in your site. The default features include user management, groups, messages, activities, friends, and notifications. Many people use this plugin to build mini-social networks.
Now, we can take a look at the requirement for integrating these three plugins.
Assume that we have a point system in our site using MyCred. Users can earn points through various tasks and spend those points to get wide range of benefits. In this scenario, we assume users only get points by purchasing products from the WooCommerce store. The points will be given for completed orders based on order value. Once the user reaches a specific number of points, the user will be added automatically to a private BuddyPress group.
Before starting the implementation, we need to create a new plugin called WPQPI Plugin Integrations in a new plugin directory called wpquick-plugin-integrations. The process for creating the main file and using header comments to define the plugin will be the same as previous scenarios.