Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.
If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/
This snippet demonstrates how you can change what appears on the subscription tab created by Restrict Content Pro – Ultimate Member.
/**
* Remove RCPUM account_page function
*/
add_action( 'wp_loaded', function () {
remove_action( 'um_account_content_hook_subscription', array(
RCP_UM\UltimateMember2::get_instance(),
'account_page'
) );
} );
/**
* Recreated RCPUM account page with modified output
*/
add_action( 'um_account_content_hook_subscription', function ( $info ) {
ob_start(); ?>
<div class="um-account-heading uimob340-hide uimob500-hide">
<i class="echo esc_attr( $info['icon'] ); "></i>echo esc_html( $info['title']
);
</div>
<hr/>
if ( ! has_shortcode( get_the_content(), 'subscription_details' ) ) {
echo do_shortcode( '[subscription_details]' );
}
if ( ! has_shortcode( get_the_content(), 'rcp_update_card' ) ) {
echo do_shortcode( '[rcp_update_card]' );
}
return ob_get_clean();
} );