Integration Notes
Notes on how the plugin behaves with common companion plugins and themes. No code changes are required for standard setups — the plugin auto-detects what is available.
BuddyBoss Platform
Section titled “BuddyBoss Platform”BuddyBoss ships its own follow system inside the Activity component. The plugin detects this automatically using bffs_is_buddyboss() and bp_is_activity_follow_active().
How follow rendering works on BuddyBoss:
- If BuddyBoss Platform is active and activity-follow is enabled,
bffs_render_follow_button()callsbp_add_follow_button()— the BuddyBoss native function. - If BuddyBoss activity-follow is disabled, the Follow button is hidden entirely. The suggestion widget still works for friend suggestions.
- The
bffs_get_follow_component()helper returns'activity'on BuddyBoss (instead of'follow') so that any integration code checking the component name gets the right value.
Check which path is active:
if ( bffs_is_buddyboss() ) { // BuddyBoss environment $follow_active = function_exists( 'bp_is_activity_follow_active' ) && bp_is_activity_follow_active();} else { $follow_active = function_exists( 'bp_is_active' ) && bp_is_active( 'follow' );}BP Follow plugin
Section titled “BP Follow plugin”When the standalone BP Follow plugin is active and BuddyBoss is not, bffs_render_follow_button() calls bp_follow_add_follow_button() with leader_id and follower_id args.
The bffs_is_follow_available() function returns true when:
- BuddyBoss is active and activity-follow is active and
bp_add_follow_button()exists, or - The BP Follow plugin is active (
bp_is_active( 'follow' )) andbp_follow_add_follow_button()exists.
If neither condition is met, the Follow button is omitted silently.
Profile field matching
Section titled “Profile field matching”The scoring engine uses BP_XProfile_ProfileData::get_all_for_user() to batch-load profile data. If that class or method is unavailable (older BuddyPress versions), it falls back to a single batched $wpdb query.
Fields must be configured in the admin under General settings → Match Data for the engine to compare them. Fields that have not been added there are ignored.
Multi-value fields (checkboxes, multi-select boxes): any overlap between the two users’ selections awards the full configured weight for that field. Multiple overlapping values do not stack — the weight is awarded once or not at all.
Single-value fields: exact string equality is required.
Required fields (“stop match”): if either user has no value for a required field, or if the values do not overlap, the entire pair scores 0 regardless of other fields.
Caching
Section titled “Caching”The plugin supports two cache backends, configurable under Advanced settings:
| Backend | How it works |
|---|---|
| Transients (default) | Uses WordPress transients stored in wp_options. Compatible with all hosting environments. |
| Object cache | Uses wp_cache_get() / wp_cache_set() with the bp_suggestions and bp_suggestions_scores groups. Requires a persistent object cache (Redis, Memcached). |
To clear the cache from code:
bp_suggestions_clear_cache();This clears both backends. To clear for a single user, delete the specific transient:
delete_transient( 'bffs_suggestions_' . $user_id );The bp_suggestions_cache_cleared action fires after a full cache clear. The bffs_cache_cleared action fires after an admin-triggered clear.
WooCommerce / EDD
Section titled “WooCommerce / EDD”The plugin includes an EDD-powered license updater (edd-license/EDD_BFFS_Plugin_Updater.php). This is only used for license validation and update delivery. It does not integrate with WooCommerce and has no effect on suggestion functionality.
Shortcodes
Section titled “Shortcodes”Eight shortcodes are available. See docs/SHORTCODES.md in the repository for the full reference including attributes, output, and logged-out behavior.
Quick list:
| Shortcode | Description |
|---|---|
[bp_friend_suggestions] |
Friend suggestion grid/list |
[bp_follow_suggestions] |
Follow suggestion grid/list |
[bp_match_percentage user_id="X"] |
Compatibility score between current user and a target |
[bp_top_matches] |
Highest-scoring matches, sorted descending |
[bp_common_interests user_id="X"] |
Shared profile field values |
[bp_mutual_friends user_id="X"] |
Friends in common |
[bp_suggestions_count] |
Count of available suggestions |
[bp_match_breakdown user_id="X"] |
Field-by-field score breakdown |
Theme compatibility
Section titled “Theme compatibility”The plugin’s CSS uses a BEM-style naming convention under the .bffs- prefix. All layout classes are listed in Template Overrides.
Known theme interactions:
- Some themes override
.members-liststyles. The list-layout template uses this class for BP directory compatibility. If the layout looks broken, inspect whether the theme targets this class globally. - The Swiper slider injects its own CSS via the
swiper-stylehandle. If you are already loading Swiper independently, check for version conflicts — the plugin bundles Swiper 11.1.0. - The plugin registers (but does not auto-enqueue)
bp-friend-follow-public-css. It is enqueued on demand by the widgets and when a BFFS shortcode is detected in the current page. Use thebffs_force_public_enqueuefilter to load it unconditionally if needed.
Multisite
Section titled “Multisite”The plugin’s options (bffs_general_setting, bffs_advanced_setting, etc.) are stored at the site (blog) level, not the network level. Each site in a multisite network has independent settings and suggestion data. There is no network-wide configuration interface.

