$user_patreon_level and $user_patronage: difference?

Hello,
I do not fully understand the difference between
$user_patreon_level and $user_patronage

$user_patreon_level = true or false if user is a Patreon or not
$user_patronage = numeric value of the tier (eg. 700 for $7)

correct?

I made a code snippet to limit the credits’ usage for another plugin depending on the Patreon tier, but the $user_patreon_level is missing in the below code.
Do I need it like this ?
$user_patreon_level = get_user_meta($user->ID, 'cb_p6_a1_patreon_level', true);

my snippet

add_filter( 'mwai_stats_credits', function ( $credits, $userId ) {
  $user = get_userdata( $userId );
  if ( is_user_logged_in() ) {
    $user_patronage = Patreon_Wordpress::getUserPatronage();
    $vip = get_user_meta( $user->ID, 'cb_p6_a1_vip_user', true );
    if ( $user_patronage >= 2100 || $vip ) {
      return 200;
    } elseif ( $user_patronage >= 1100 ) {
      return 100;
    } elseif ( $user_patronage < 1100 ) {
      return 10;
    }
  }
  // This will be basically the default value set in the plugin settings
  // for logged-in users.
  return $credits;
}, 10, 2);

Thanks!

cb_p6_a1_patreon_level is specific to Patron Pro. If you give a user a custom $ level in that user’s WP profile in WP admin, that user will have that $ level assigned to him or her, allowing overriding whatever tier that the post is locked for. (as long as the custom $ level is higher than the tier).

It doesnt do the same thing with user_patronage.

Now I get it , thanks!

1 Like