mtbrex
Forum Replies Created
-
@iwebcrafter what was your problem? Maybe mine has the same thing.
We are using the skillfulplugins Restrict Content Pro/Ultimate Member plugin and it seems to do very little. As far as I can tell, from inside the UM profile, if the user clicks the settings icon, and then clicks ‘My Account’, on the page that opens there is a tab where you can see your active RCP membership and click links to make changes. We were hoping for more integration options than that.
@thehorsebc I wanted to try your solution, but my PHP is terrible. When I created a new plugin with your code I got syntax errors on lines 21 and 41. This was my plugin code. It would be awesome if you could take a look at it and let me know if there is anything obviously wrong. It was great to finally see some more discussion about UM RCP integration.
<?php
/*
Plugin Name: UMRCP Membership Tab
Plugin URI:
Description: A plugin that should create a new RCP membership tab in Ultimate Member
Version:
Author:
Author URI:
License:
License URI:
*/
/*********************************************************************
* function to add a tab to UM user account page to show RCP MEMBERSHIP
**********************************************************************/
/* add new tab called “membership” */add_filter(‘um_account_page_default_tabs_hook’, ‘my_membership_tab_in_um’, 300 );
function my_membership_tab_in_um( $tabs ) {
$tabs[700][‘membership’][‘icon’] = ‘um-icon-ios-box’;
$tabs[700][‘membership’][‘title’] = ‘My_Membership’;
$tabs[700][‘membership’][‘custom’] = true;
$tabs[700][‘membership’][‘show_button’] = false;
return $tabs;
}/* make our new tab hookable */
add_action(‘um_account_tab__membership’, ‘um_account_tab__membership’);
function um_account_tab__membership( $info ) {
global $ultimatemember;
extract( $info );$output = $ultimatemember->account->get_tab_output(‘membership’);
if ( $output ) { echo $output; }
}/* Finally we add some content in the tab */
add_filter(‘um_account_content_hook_membership’, ‘um_account_content_hook_membership’);
function um_account_content_hook_membership( $output ){
ob_start();
?>
<?php echo do_shortcode(‘[subscription_details]’); ?>
<?php
$output .= ob_get_contents();
ob_end_clean();
return $output;
}