Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save strangerstudios/d8ece014a0c0d921a4b79e9dc8876592 to your computer and use it in GitHub Desktop.
Save strangerstudios/d8ece014a0c0d921a4b79e9dc8876592 to your computer and use it in GitHub Desktop.
Show a member's expiration date on bbPress profile page.
/*
Use this recipe in conjunction with PMPro bbPress Add On
plus this gist: https://gist.github.com/strangerstudios/ff354cd84254b856ef5194c4259c9e38
Add this code to your active theme's functions.php or a custom plugin.
*/
function pmpro_expiration_date_shortcode_output() {
$user_id = bbp_get_user_id( 0, true, false );
?>
<div class="bbp-user-section"><p class="muted"><em>Membership expires on <?php echo do_shortcode('[pmpro_expiration_date user="' . $user_id . '"]'); ?></em></p></div>
<?php
}
add_action('bbp_template_before_user_profile', 'pmpro_expiration_date_shortcode_output', 15, 0);
@kimcoleman
Copy link

This gist is outdated and should be replaced with: https://gist.github.com/kimcoleman/769fea41034a495df6d0266e99bc4453

@rseales
Copy link

rseales commented Jun 23, 2023

Kim . how are you. I m Rodolfo Seales. I from Colombia. Is possible to talk with you or your husband Mr. Coleman? The subject is new feature or new plugin design for Paid Membership Pro, for new form of Pay with new for register user. Please, write me where send you more explanation details. my email is rseales@yahoo.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment