The amount and which membership the person signed up

I have a marketing person asking how he can get the amount and which membership the person signed up from the thank you page.

is there something i can do?

  • Panos

    Hey uxwebtech ,

    You can modify that page's content with the wp_content filter like in the following example:

    add_filter( 'the_content', function( $content ){
    	if ( ! class_exists( 'MS_Model_Pages' ) || ! isset( $_REQUEST[ 'ms_relationship_id' ] )  ) {
    		return $content;
    	$the_page 			= MS_Model_Pages::current_page();
    	if ( MS_Model_Pages::MS_PAGE_REG_COMPLETE == MS_Model_Pages::get_page_type( $the_page ) ) {
    		$subscription 	= MS_Factory::load(
    							absint( intval( $_REQUEST['ms_relationship_id'] ) )
    		$membership 	= $subscription->get_membership();
    		$settings 		= MS_Plugin::instance()->settings;
    		$price 			= sprintf(
    							'%s %s',
    							MS_Helper_Billing::format_price( $membership->price )
    		$content .= "<p>";
    			$content .= "Your new Memebrship is <strong>{$membership->name}</strong><br />";
    			$content .= "Your new Memebrship's price is <strong>{$price}</strong>";
    		$content .= "</p>";
    	return $content;
    }, 20 );

    In above example I added 2 new lines at the end of the content displaying the membership name and price. You can replace the content with entirely new text and add the $membership->name and $price variables wherever you need :slight_smile:

    Hope this helps :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.