Skip to content

Tiered Credit Pricing

Charge different credit costs to different members by applying a percentage multiplier to the base cost. A premium PMPro level might post jobs at 0% (free); a basic member pays 100% (full price); a discounted tier pays 50%. The rules live in one option, keyed by membership source.

It is a multiplier, not a flat price. The matrix stores a percentage (0-100, or higher to mark up). The final cost is round( base_cost * multiplier / 100 ), floored at 0. A multiplier of 0 means free for that tier; 100 means full price; 50 means half.

Loaded outside the BuddyPress gate. This integration runs on PMPro / MemberPress sites without BuddyPress too - it reads whichever source the user belongs to and applies the lowest matching multiplier.

BpTieredCreditCost hooks the wcbp_consumer_cost filter, which Career Board fires for the job_post consumer (base = the board’s per-board credit_cost) and the featured_upgrade consumer (base = the wcbp_featured_upgrade_cost option). It reads a single option, wcbp_credit_cost_matrix, keyed by:

consumer -> source -> key -> multiplier (percentage)

When a user posts a job (or upgrades a job to featured), the integration checks every source the user belongs to, collects the matching multipliers, and applies the lowest one. If the base cost is 0 or there is no logged-in user, the base cost passes through unchanged.

Source key What the inner key is Resolved by
bp_type BuddyPress member-type slug bp_get_member_type()
pmpro Paid Memberships Pro level id (integer) pmpro_getMembershipLevelForUser()
memberpress MemberPress membership id (integer) MeprUser::active_product_subscriptions( 'ids' )

A source only contributes a multiplier when its plugin is active and the user actually belongs to a listed tier. PMPro and MemberPress are keyed by numeric membership id, not by slug.

update_option( 'wcbp_credit_cost_matrix', array(
'job_post' => array(
'bp_type' => array(
'mentor' => 0, // BP member type "mentor" posts free
'company' => 100, // company members pay full price
'staff' => 25, // staff pay a quarter
),
'pmpro' => array(
2 => 0, // PMPro level id 2 posts free
3 => 50, // PMPro level id 3 pays half
),
'memberpress' => array(
7 => 0, // MemberPress membership id 7 posts free
),
),
'featured_upgrade' => array(
'pmpro' => array(
2 => 0, // level id 2 upgrades to featured for free
),
),
) );

If a user is both pmpro level 3 (multiplier 50) and bp_type mentor (multiplier 0), the integration applies 0 because the lowest multiplier wins.

The most common configuration: free job posts for paying members, full price for everyone else.

  1. Leave the board’s base credit_cost at your full price (say 10).
  2. Add a 0 multiplier for the paid level(s) in the matrix.
update_option( 'wcbp_credit_cost_matrix', array(
'job_post' => array(
'pmpro' => array(
2 => 0, // Premium: free
3 => 50, // Pro: half price (5 credits on a 10 base)
),
),
) );

Members with no listed tier just pay the base cost.

  1. If base cost is 0 or there is no logged-in user, return the base cost.
  2. Read the rules for this consumer (job_post / featured_upgrade); if none, return the base cost.
  3. Collect the lowest multiplier from each source the user belongs to (BP member types, PMPro level, MemberPress memberships).
  4. If no source matched, return the base cost. Otherwise apply round( base * min(multipliers) / 100 ), floored at 0.

This release has no settings UI for the matrix. Set wcbp_credit_cost_matrix with update_option() (a small mu-plugin or a WP-CLI wp option update --format=json call works well). The BuddyPress card under Career Board → Settings → Integrations covers the profile tabs and notification toggles only, not tiered pricing.

wcbp_consumer_cost runs at priority 10 inside the integration, so a higher priority overrides it:

// Always charge full price for one tagged employer, regardless of their tier.
add_filter( 'wcbp_consumer_cost', function ( $cost, $user_id, $item_id, $board_id, $consumer ) {
if ( 'job_post' === $consumer
&& in_array( 'enterprise_customer', wp_get_object_terms( $user_id, 'employer_tag', array( 'fields' => 'slugs' ) ), true )
) {
return 10;
}
return $cost;
}, 20, 5 );