• Resolved thejoshevans

    (@thejoshevans)


    Hi, I’m using your plugin to create a Trade section on a website and am planning to use a picture in the Subscription description section to allow me to assign an ‘Account Manager’ to each member.

    Everything so far has worked as planned however I can’t find a way of pulling the subscription information to use on another page. Is there a way of setting up a shortcode to pull the subscription name and description?

    If you can point me in the right direction that would be great!

    Thanks

    Josh

    https://wordpress.org/plugins/membership/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi Josh,

    I hope you are well today and thank you for your question.

    Is there a way of setting up a shortcode to pull the subscription name and description?

    You can use the following shortcodes to display subscription name and description.

    [subscriptiontitle subscription="2"] – The title of the subscription.
    [subscriptiondetails subscription="2"] – The Subscription plan details.

    Along with above shortcodes you can also use the following shortcodes which displays subscription plan price and button.

    [subscriptionprice subscription="2"] – The subscription plan price.
    [subscriptionbutton subscription="2"]  - And the subscription plan button

    Replace the number with the ID of the subscription.

    Best Regards,
    WPMU DEV

    Thread Starter thejoshevans

    (@thejoshevans)

    Hi,

    That works almost perfectly!

    I’m having a problem with the subscription price shortcode. No matter what info I enter into the price box on the Subscriptions admin screen, it will only show ‘Free’.

    Am I missing something?

    Thanks

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Hi Josh,

    Thank you for your reply.

    I could reproduce the same issue on my test site subscription price shortcode therefore i have notified the plugin developer to fix it.

    In the meanwhile to fix this issue just try editing the following Membership plugin file on line number 1986

    Membership plugin file:
    membership/membershipincluds/classes/membershippublic.php

    Before Editing:

    $first = $sub->get_level_at_position(1);
    
    if(!empty($first)) {
    	$price = $first->level_price;
    	if($price == 0) {
    		$price = "Free";
    	} else {
    
    		$M_options = get_option('membership_options', array());
    
    		switch( $M_options['paymentcurrency'] ) {
    			case "USD": $price = "$" . $price;
    						break;
    
    			case "GBP":	$price = "£" . $price;
    						break;
    
    			case "EUR":	$price = "€" . $price;
    						break;
    
    			default:	$price = apply_filters('membership_currency_symbol_' . $M_options['paymentcurrency'], $M_options['paymentcurrency']) . $price;
    		}
    	}
    }

    After Editing:

    $price = $sub->sub_pricetext();
    
    if( empty($price) || $price == '0' || $price == '') {
    	$price = "Free";
    } else {
    
    	$M_options = get_option('membership_options', array());
    
    	switch( $M_options['paymentcurrency'] ) {
    		case "USD": $price = "$" . $price;
    					break;
    
    		case "GBP":	$price = "£" . $price;
    					break;
    
    		case "EUR":	$price = "€" . $price;
    					break;
    
    		default:	$price = apply_filters('membership_currency_symbol_' . $M_options['paymentcurrency'], $M_options['paymentcurrency']) . $price;
    	}
    }

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    Best Regards,
    WPMU DEV

    Thread Starter thejoshevans

    (@thejoshevans)

    That works perfectly, thanks very much for your help!

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    You are most welcome, if I can be of any further assistance please don’t hesitate to ask 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show Subscription level on another page’ is closed to new replies.