Developer Guide
Reference for extending BuddyPress Business Profile. Symbols listed here are present in the shipping code.
Architecture
Section titled “Architecture”Each business is a public custom post type (business) paired one-to-one with a hidden BuddyPress group. The pairing drives the social features:
Business post (CPT: business) post meta: bp-business-group -> BuddyPress group (hidden) group meta: bp-group-business -> back to the business post- Following a business = membership of its group.
- Team members = group admins and moderators.
- Business activity = activity linked to the group.
Business details (contact, hours, services, social links, action button) are stored as post meta on the business, not as BuddyPress xProfile fields.
There are no REST API routes and no cron events in this plugin.
Post Type and Taxonomies
Section titled “Post Type and Taxonomies”- Post type:
business(public, has archive, supports title, editor, author, thumbnail, excerpt). - Taxonomies:
business-category(hierarchical) andbusiness-type(non-hierarchical).
Key Meta Keys
Section titled “Key Meta Keys”| Meta key | On | Purpose |
|---|---|---|
bp-business-group |
business post | Linked BuddyPress group ID |
bp-group-business |
group | Linked business post ID |
_business_action-button |
business post | Selected action-button type |
_business_action-button_{type} |
business post | Value for the selected action |
_Organizer_id |
business post | The Events Calendar organizer ID |
_company_space |
job listing | Links a WP Job Manager job to a business |
Read the linked group ID through the canonical accessor rather than get_post_meta() directly:
$group_id = bp_business_profile_get_group_id( $business_id );Settings Options
Section titled “Settings Options”Settings are stored as these options (arrays):
bp_business_profile_general_settingsbp_business_profile_business_view_settingsbp_business_profile_map_settingsbp_business_profile_reviewbp_business_member_accessbp_business_taxonomy_filterbp_business_integration
Filters
Section titled “Filters”// Group visibility for a business's backing group (default: hidden)add_filter( 'bp_business_profile_group_status', function ( $status, $business_id, $user_id ) { return 'hidden'; // 'public' | 'private' | 'hidden'}, 10, 3 );
// Post status for a newly created business (e.g. require approval)add_filter( 'bp_business_publish_post_status', function ( $status ) { return 'pending';} );
// Modify the create-a-business wizard stepsadd_filter( 'bp_business_profile_creation_steps', function ( $steps ) { return $steps;} );
// Override where a template file is locatedadd_filter( 'bp_business_profile_locate_template', function ( $path, $file_name ) { return $path;}, 10, 2 );
// Adjust action-button labelsadd_filter( 'bp_business_profile_action_label', function ( $labels ) { return $labels;} );
// Adjust the list of social networksadd_filter( 'bp_business_profile_social_network', function ( $networks ) { return $networks;} );
// Filter business description / services outputadd_filter( 'bp_business_profile_filter_content', function ( $content ) { return $content;} );
// Integration tab sidebarsadd_filter( 'bp_business_profile_product_show_sidebar', '__return_false' );add_filter( 'bp_business_profile_events_show_sidebar', '__return_false' );add_filter( 'bp_business_profile_myjobs_show_sidebar', '__return_false' );
// Show product pagination once a business has more than N products (default 20)add_filter( 'bp_business_profile_min_products_pagination', function ( $min ) { return 10;} );Actions
Section titled “Actions”// After a business is created or saveddo_action( 'bp_business_profile_after_save_business', $business_id );
// Around the single-business headerdo_action( 'bp_before_business_header' );do_action( 'bp_after_business_header' );
// After a review is saved (custom review data)do_action( 'bp_business_profile_review_custom_data', $data );Member Quota
Section titled “Member Quota”Resolve a member’s allowed business count (respecting profile-type, role, then global limits):
$quota = bp_business_profile_get_user_quota( $user_id );AJAX Actions
Section titled “AJAX Actions”All logged-in AJAX actions use the bp-business-profile-nonce nonce unless noted. Selected actions:
| Action | Purpose |
|---|---|
bp_business_follow |
Follow or unfollow a business |
bp_business_profile_filter |
Directory filter (category, search, view, location) |
business_profile_data_save |
Save business profile fields |
upload_business_avatar / upload_business_cover |
Image uploads |
bp_business_profile_save_reply |
Reply to a review |
bp_business_profile_transfer_ownership |
Transfer ownership (owner only) |
bp_business_profile_export_data |
Export a business as JSON (owner only) |
submit_business_claim / approve_business_claim / reject_business_claim |
Claim workflow (claim nonces; approve/reject require manage_options) |
Database
Section titled “Database”The plugin creates one custom table, {prefix}bp_business_claims, holding claim requests (business ID, user ID, status, reason, contact fields, verification documents, admin notes, and timestamps), with a unique key on business + user + status. Reviews are stored as WordPress comments on the business post.
Template Overrides
Section titled “Template Overrides”Copy a template from the plugin’s templates/ folder into your theme to override it:
theme/bp-business-profile/ business-loop.php business-create.php business-search.php personal-businesses.php (own profile Business tab) members-businesses.php (another member's businesses) members-followed-businesses.php (following tab) single/ about.php services.php business-reviews.php product.php (WooCommerce Shop tab) events.php (Events tab) my-jobs.php (Jobs tab) settings/ general-settings.php ...
