How do I change front end labels/messages for membership 2 pro?

I have installed membership 2 pro on a site I am developing and I would like to change the labeling to refer to "profile" instead of account. I also need to remove "payment" messages since we are using payments in this installation. How?

  • Nastia
    • Support Rock Star

    Hello Titanium Creative

    I hope you are doing well today!

    You can change any text on the front end or/and back end with the Ultimate Branding plugin. Once you install and activate the plugin, navigate from your Dashboard to Branding menu and enable Network Wide Text Change module

    Inside the "Find this Text" field, write the phrase or word you wish to replace and inside the field "and replace it with" write the text you wish to be shown to the members.

    Let us know if you require any further assistance!


  • Titanium Creative
    • Schcommunity Organizer

    Ok. A couple of observations though.

    I really don't think I should have to install a plugin to change one word in a label.

    Also, it looks like that is going to change every instance of the word "account" to the word "profile".

    Is there not a filter hook or anything in Membership that will let me make some changes to the front end?

  • Titanium Creative
    • Schcommunity Organizer

    I found it. The word Account was simply the title of the page MS2 set up. I was able to easily change both the title and the permalink to profile by editing the page.

    ALSO, I searched through the code and found this in class-ms-view-shortcode-account.php

    line 13 allows for a fully customized page:

    add_filter('ms_shortcode_custom_account', function($content, $data)
            // Display $data to see what we are working with
    	$content = '<pre>'.print_r($data,true).'</pre>';
            $content .= 'Custom Page designed with information from $data';
    	return $content;
    }, 10 , 2);

    I added this to line 28 (and would request an update in MS2 to do this)

    //	Filter the data to edit options prior to building page
    		$this->data = apply_filters('ms_shortcode_atts_pre',$this->data);

    That allows for:

    add_filter('ms_shortcode_atts_pre', function($data)
    	$data['profile_title'] = 'A Different Title';
    	return $data;

    With that added filter you can edit any of these values to control display as well as labels.

    [show_membership] => 1
    		[show_membership_change] => 1
    		[membership_title] => Your Membership
    		[membership_change_label] => Change
    		[show_profile] => 1
    		[show_profile_change] => 1
    		[profile_title] => Personal details
    		[profile_change_label] => Edit
    		[show_invoices] =>
    		[limit_invoices] => 10
    		[show_all_invoices] => 1
    		[invoices_title] => Invoices
    		[invoices_details_label] => View all
    		[show_activity] => 1
    		[limit_activities] => 10
    		[show_all_activities] => 1
    		[activity_title] => Activities
    		[activity_details_label] => View all

    I should also not that, if you don't need to run any conditional processing, any of those values can be changed in the shortcode like:
    [ms-membership-account show_invoices=0 profile_title="A Different Title"]

    I hope this helps. I'm going to open a request for that filter to be added.

    • Titanium Creative
      • Schcommunity Organizer

      Thanks for the points! I'm sure I'll be offering more of this up as I get deeper into Membership 2 Pro and some of the other plugins.

      I've always been one who travels off the path so I have to find ways to do what I need to have happen rather than conform my needs to what is available. I'm just happy that I have found WPMUDEV. Your plugins so far do most of what I need out of the box or with minimal hook use.

      Now I know you will be responsive if I need hooks added (assuming, of course that they are in fact useful) !!

      Great job WPMUDEV!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.