Pmpro Register Helper Shortcodes

Below, you’ll find a detailed guide on how to add the Pmpro Register Helper Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Pmpro Register Helper Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Pmpro Register Helper Plugin and the shortcodes it provides:

Plugin Icon
Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro

"Custom User Profile Fields for User Registration & Member Frontend Profiles with Paid Memberships Pro is a plugin that enhances user registration by adding customizable fields. It integrates flawlessly with Paid Memberships Pro ensuring a seamless user experience."

★★✩✩✩ (12) Active Installs: 5000+ Tested with: 6.2.3 PHP Version: 6.1.1
Included Shortcodes:
  • [pmprorh_change_password_form]
  • [pmpro_directory level="1"]
  • [pmpro_profile]
  • []
  • [pmpro_signup]

Pmpro Register Helper [pmprorh_change_password_form] Shortcode

The PMPro Register Helper shortcode is used to generate a user password change form. It creates a form with fields for the current password, new password, and password confirmation. The form also includes a message area for feedback and a submit button. The function uses ob_start() and ob_end_clean() to capture the form’s HTML and return it as a string.

Shortcode: [pmprorh_change_password_form]

Examples and Usage

Basic example – A simple implementation of the pmprorh_change_password_form shortcode without any additional attributes.

[pmprorh_change_password_form /]

PHP Function Code

In case you have difficulties debugging what causing issues with [pmprorh_change_password_form] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode("pmprorh_change_password_form", "pmprorh_change_password_form_shortcode");

Shortcode PHP function:

function pmprorh_change_password_form_shortcode($atts, $content=null, $code="")
{
	// $atts    ::= array of attributes
	// $content ::= text within enclosing form of shortcode element
	// $code    ::= the shortcode found, when == callback name
	// examples: [pmprorh_change_password_form]

	/*
	extract(shortcode_atts(array(
		'level' => NULL
	), $atts));
	*/		
		
	global $current_user, $pmpro_msg, $pmpro_msgt, $pmprorh_options;
	ob_start();
	?>	
<form class="pmpro_form" name="changepasswordform" id="changepasswordform" action="" method="post">
	<?php if($pmpro_msg) 
		{
	?>
		<div id="pmpro_message" class="pmpro_message <?php echo $pmpro_msgt?>"><?php echo $pmpro_msg?></div>
	<?php
		}
		else
		{
	?>
		<div id="pmpro_message" class="pmpro_message" style="display: none;"></div>
	<?php
		}
	?>
		
	<div id="div_pass0">
		<label>Current Password</label>
		<input type="password" name="pass0" id="pass0" class="input" value="" size="25" /> <span class="pmpro_asterisk">*</span>
	</div>
	<div id="div_pass1">
		<label>New Password</label>
		<input type="password" name="pass1" id="pass1" class="input" value="" size="25" /> <span class="pmpro_asterisk">*</span>
	</div>
	<div id="div_pass2">
		<label>Confirm Password</label>
		<input type="password" name="pass2" id="pass2" class="input" value="" size="25" /> <span class="pmpro_asterisk">*</span>
	</div>
	<div class="pmpro_submit">
		<input class="pmpro_btn" type="submit" name="wp-submit" id="wp-submit" value="Change Password" tabindex="100" />
	</div>
</form>

<p class="top1em"><span class="pmpro_asterisk">* Required Field</span></p>
	<?php
	$temp_content = ob_get_contents();
	ob_end_clean();

	return $temp_content;
}

Code file location:

pmpro-register-helper/pmpro-register-helper/modules/change-password.php

Pmpro Register Helper [pmpro_directory level=”1″] Shortcode

The pmpro-register-helper plugin shortcode, “pmpro_directory”, is used to display a directory of members on a page. It accepts the ‘level’ attribute to filter members by their membership level. The shortcode executes a SQL query to fetch user details, which are then displayed in a structured format. It also includes a search form to find specific members and pagination for easy navigation.

Shortcode: [pmpro_directory level="1"]

Parameters

Here is a list of all possible pmpro_directory level=”1″ shortcode parameters and attributes:

  • level – Specifies the membership level to display in the directory

Examples and Usage

Basic example – Display a directory of all active members

[pmpro_directory /]

Advanced examples

Display a directory of active members who are subscribed to a specific membership level. In this case, the membership level ID is 1.

[pmpro_directory level="1" /]

Display a directory of active members with pagination. The ‘limit’ attribute is used to specify the number of members per page. In this example, we are displaying 10 members per page.

[pmpro_directory limit="10" /]

Combine multiple attributes to create more complex queries. In this example, we are displaying a directory of active members who are subscribed to membership level 1, and we are limiting the display to 10 members per page.

[pmpro_directory level="1" limit="10" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [pmpro_directory level="1"] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode("pmpro_directory", "pmprorh_directory_shortcode");

Shortcode PHP function:

function pmprorh_directory_shortcode($atts, $content=null, $code="")
{
	// $atts    ::= array of attributes
	// $content ::= text within enclosing form of shortcode element
	// $code    ::= the shortcode found, when == callback name
	// examples: [pmpro_directory level="1"]	directory of level 1 members

	extract(shortcode_atts(array(
		'level' => NULL
	), $atts));
	
	//some vars for the search	
	global $wpdb, $pmprorh_options;
	if(isset($_REQUEST['ps']))
		$s = $_REQUEST['ps'];
	else
		$s = "";
	
	if(isset($_REQUEST['pk']))
		$key = $_REQUEST['pk'];
	else
		$key = "";
		
	if(isset($_REQUEST['pn']))
		$pn = $_REQUEST['pn'];
	else
		$pn = 1;
		
	if(isset($_REQUEST['limit']))
		$limit = $_REQUEST['limit'];
	else
		$limit = 5;
	
	$end = $pn * $limit;
	$start = $end - $limit;				
				
	if($s)
	{
		$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, u.user_nicename, u.display_name, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->usermeta um ON u.ID = um.user_id LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id WHERE mu.status = 'active' AND mu.membership_id > 0 AND ";
		
		if(empty($key))
			$sqlQuery .= "(u.user_login LIKE '%$s%' OR u.user_email LIKE '%$s%' OR u.display_name LIKE '%$s%' OR um.meta_value LIKE '%$s%') ";
		else
			$sqlQuery .= "(um.meta_key = '" . esc_sql($key) . "' AND um.meta_value LIKE '%$s%') ";
	
		if($level)
			$sqlQuery .= " AND mu.membership_id IN(" . $level . ") ";					
			
		$sqlQuery .= "GROUP BY u.ID ORDER BY user_registered DESC LIMIT $start, $limit";
	}
	else
	{
		$sqlQuery = "SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, u.user_nicename, u.display_name, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u LEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id LEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id";
		$sqlQuery .= " WHERE mu.membership_id > 0  AND mu.status = 'active' ";
		if($level)
			$sqlQuery .= " AND mu.membership_id IN(" . $level . ") ";
		$sqlQuery .= "ORDER BY user_registered DESC LIMIT $start, $limit";
	}
			
	$theusers = $wpdb->get_results($sqlQuery);
	$totalrows = $wpdb->get_var("SELECT FOUND_ROWS() as found_rows");
	
	ob_start();
	
	?>
	<form class="pmpro_directory_search">		
		<input type="text" name="ps" value="<?php if(!empty($_REQUEST['ps'])) echo esc_attr($_REQUEST['ps']);?>" />
		<input type="submit" value="Search" />
	</form>
	
	<?php if(!empty($s)) { ?>
		<h3 class="pmpro_directory_subheading">
			Profiles within <em><?php echo ucwords(esc_html($s));?></em>
		</h3>
	<?php } ?>
	
	<?php
		if(!empty($theusers))
		{
			?>
			<div class="pmpro_directory_list">
				<?php
					$count = 0;			
					foreach($theusers as $auser)
					{
						$auser = get_userdata($auser->ID);
						$count++;
						?>
						<div id="profile-<?php echo $auser->user_nicename;?>" class="pmpro_profile">														
							<a class="pmpro_thumbnail pmpro_pull-left" href="<?php echo home_url($pmprorh_options["profile_page"]);?>?pu=<?php echo $auser->user_nicename;?>">
								<?php echo get_avatar($auser->ID, 64); ?>
							</a>
							<h4 class="pmpro_profile-heading">
								<a href="<?php echo home_url($pmprorh_options["profile_page"]);?>?pu=<?php echo $auser->user_nicename;?>"><?php echo $auser->display_name;?></a>
							</h4>
							<?php 
								if(strlen($auser->description) > 50)
									echo wpautop(substr($auser->description,0,50));
								else
									echo wpautop($auser->description);
							?>
							<a href="<?php echo home_url($pmprorh_options["profile_page"]);?>?pu=<?php echo $auser->user_nicename;?>"><i class="pmpro_icon-user"></i> View Profile</a>																															
							<div class="pmpro_clear"></div>
						</div>		
						<?php																			
					}
				?>
			</div>
			<?php
		}	
		else
		{	
			?>
			<div class="pmpro_message pmpro_error">No matching profiles found<?php if($s) { ?> within <em><?php echo ucwords(esc_html($s));?></em>. <a href="<?php echo home_url($pmprorh_options["directory_page"]);?>">View All Members</a><?php } else { ?>.<?php } ?></div>
			<?php					
		}
		
		//prev/next
		?>
		<div class="pmpro_pagination">
			<?php
			//prev
			if($pn > 1)
			{			
			?>
				<span class="pmpro_prev"><a href="<?php echo add_query_arg(array("ps"=>$s, "pn"=>$pn-1), home_url($pmprorh_options['directory_page']));?>">&laquo; Previous</a></span>
			<?php
			}				
			//next
			if($totalrows > $end)
			{				
			?>
				<span class="pmpro_next"><a href="<?php echo add_query_arg(array("ps"=>$s, "pn"=>$pn+1), home_url($pmprorh_options['directory_page']));?>">Next &raquo;</a></span>
			<?php
			}
			?>
		</div>
		<?php
	?>		

	<?php
	
	$temp_content = ob_get_contents();
	ob_end_clean();
		
	return $temp_content;
}

Code file location:

pmpro-register-helper/pmpro-register-helper/modules/directory.php

Pmpro Register Helper [pmpro_profile] Shortcode

The pmpro_profile shortcode is used to display and edit user profile fields. It fetches user data based on the user_id passed in the shortcode. If no user_id is provided, it defaults to the current logged-in user. If the user_id doesn’t exist, it redirects to a 404 page. The shortcode also allows users with appropriate permissions to edit their profile fields. Shortcode: [pmpro_profile user_id=”1″]

Shortcode: [pmpro_profile]

Parameters

Here is a list of all possible pmpro_profile shortcode parameters and attributes:

  • user_id – specifies the ID of the user whose profile to display

Examples and Usage

Basic example – Displaying the profile of a specific user by referencing their user ID.

[pmpro_profile user_id=1 /]

PHP Function Code

In case you have difficulties debugging what causing issues with [pmpro_profile] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode("pmpro_profile", "pmprorh_profile_shortcode");

Shortcode PHP function:

function pmprorh_profile_shortcode($atts, $content=null, $code="")
{
	// $atts    ::= array of attributes
	// $content ::= text within enclosing form of shortcode element
	// $code    ::= the shortcode found, when == callback name
	// examples: [pmpro_profile user_id="1"]	directory of level 1 members

	global $current_user, $wpdb;
	
	extract(shortcode_atts(array(
		'user_id' => NULL
	), $atts));
	
	if(empty($user_id) && !empty($_REQUEST['pu']))		
	{
		$user_nicename = $_REQUEST['pu'];
		$user_id = $wpdb->get_var("SELECT ID FROM $wpdb->users WHERE user_nicename = '" . esc_sql($user_nicename) . "' LIMIT 1");
	}
		
	if(!empty($user_id))
		$pu = get_userdata($user_id);
	elseif(empty($_REQUEST['pu']))
		$pu = get_userdata($current_user->ID);		
	else
	{
		wp_redirect(home_url("/404"));
		exit;
	}				
		
	global $pmprorh_registration_fields;
	
	//which fields are marked for the profile	
	$profile_fields = pmprorh_getProfileFields($pu->ID);
		
	//are we saving?
	if(!empty($_REQUEST['submit-profile']))
	{
		if(!current_user_can("edit_user", $pu->ID))
			die("You do not have permission to do this.");
		
		//let's edit
		foreach($profile_fields as $field)
		{
		    if ( isset( $field->sanitize ) && true === $field->sanitize ) {
			    $value = pmprorh_sanitize( $_POST[$field->name] );
            } else {
		        $value = $_POST[$field->name];
            }

			if(isset($_POST[$field->name]))
				update_user_meta( $pu->ID, $field->name, $value );
		}
		
		//reset profile fields
		$profile_fields = pmprorh_getProfileFields($pu->ID);
		
		$pmpro_msg = "Profile saved.";
		$pmpro_msgt = "success";
	}
	
	ob_start();	
	//heading
	if(!empty($pmpro_msg))
	{
	?>
		<div id="pmpro_message" class="pmpro_message <?php echo $pmpro_msgt?>"><?php echo $pmpro_msg?></div>
	<?php
	}		
	
	//show bio
	if(!empty($pu->description))
		echo wpautop($pu->description);
	
	//show users be able to edit their own profile?
	$edit_own_profile = false;	//can just send them to the WP profile page to edit if you want
	
	//show the fields
	if(!empty($profile_fields))
	{	
		?>
		<div class="pmpro_directory_profile">
		<form action="" method="post">
			<table class="form-table">
			<?php			
			foreach($profile_fields as $field)
			{			
				$field->displayInProfile($pu->ID, $edit_own_profile);			
			}
			?>
			</table>
			
			<?php if(current_user_can("edit_users", $current_user->ID) && $edit_own_profile) { ?>
			<div class="pmpro_submit">
				<span id="pmpro_submit_span">
					<input type="hidden" name="submit-profile" value="1">		
					<input type="submit" class="pmpro_btn pmpro_btn-submit" value="Save Profile">				
				</span>
			</div>
			<?php } ?>
		</form>
		</div>
		<?php
	}	
			
	$temp_content = ob_get_contents();
	ob_end_clean();
	
	return $temp_content;
}

Code file location:

pmpro-register-helper/pmpro-register-helper/modules/profile.php

Pmpro Register Helper [null] Shortcode

The pmpro-register-helper plugin shortcode aids in generating a custom registration form. The shortcode: [pmprorh_register_form] creates a form with fields for username, email, and password. It also includes a confirmation password field and a hidden field for full name. The form also includes a submit button and links for login and password recovery.

Shortcode: [null]

Examples and Usage

Basic example – Displays the registration form on your page or post.

[pmprorh_register_form /]

PHP Function Code

In case you have difficulties debugging what causing issues with [null] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode("pmprorh_register_form", "pmprorh_register_form_shortcode");

Shortcode PHP function:

function pmprorh_register_form_shortcode($atts, $content=null, $code="")
{
	// $atts    ::= array of attributes
	// $content ::= text within enclosing form of shortcode element
	// $code    ::= the shortcode found, when == callback name
	// examples: [pmprorh_register_form]

	/*
	extract(shortcode_atts(array(
		'level' => NULL
	), $atts));
	*/
	
	if(!empty($_REQUEST['wp-submit']))
	{
		$user_login = $_REQUEST['user_login'];
		$user_email = $_REQUEST['user_email'];		
	}
	else
	{
		$user_login = "";
		$user_email = "";
	}
		
	global $current_user, $pmpro_msg, $pmpro_msgt, $pmprorh_options;
	ob_start();
	?>	
<form name="registerform" id="registerform" action="" method="post">
	<?php if($pmpro_msg) 
		{
	?>
		<div id="pmpro_message" class="pmpro_message <?php echo $pmpro_msgt?>"><?php echo $pmpro_msg?></div>
	<?php
		}
		else
		{
	?>
		<div id="pmpro_message" class="pmpro_message" style="display: none;"></div>
	<?php
		}
	?>
	
	<?php		
		if(empty($pmprorh_options['use_email_for_login']))
		{
	?>
	<div id="div_user_login">
		<label>Username</label>
		<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="25" /> <span class="required">* Required</span>
	</div>
	<?php
		}
	?>
	<div id="div_user_email">
		<label>E-mail</label>
		<input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr($user_email); ?>" size="25" /> <span class="required">* Required</span>
	</div>
	<?php do_action("pmprorh_after_email"); ?>
	<div class="pmpro_hidden">
        	<label for="fullname"><?php _e('Full Name', 'pmpro-register-helper');?></label>
        	<input id="fullname" name="fullname" type="text" class="input <?php echo pmpro_getClassForField("fullname");?>" size="30" value="" /> <strong><?php _e('LEAVE THIS BLANK', 'pmpro-register-helper');?></strong>
    	</div>
	<div id="div_pass1">
		<label>Password</label>
		<input autocomplete="off" name="pass1" id="pass1" size="25" class="input" value="" type="password" /> <span class="required">* Required</span>
	</div>
	<?php
		$pmpro_checkout_confirm_password = apply_filters("pmpro_checkout_confirm_password", true);					
		if($pmpro_checkout_confirm_password)
		{
		?>
		<div id="div_pass2">
			<label>Confirm Password</label>
			<input autocomplete="off" name="pass2" id="pass2" size="25" class="input" value="" type="password" /> <span class="required">* Required</span>
		</div>   
		<?php
		}
	?>
	
	<?php do_action("pmprorh_after_password"); ?>    
    <?php do_action("pmprorh_register_form"); ?>
	
	<br class="clear" />
	<div class="submit">
		<label>&nbsp;</label>
		<input type="submit" name="wp-submit" id="wp-submit" value="Register" tabindex="100" />
	</div>
</form>

<p id="nav">
<a href="<?php echo home_url("wp-login.php");?>">Log in</a> |
<a href="<?php echo home_url("/wp-login.php?action=lostpassword");?>" title="Password Lost and Found">Lost your password?</a>
</p>

<p class="top1em required">* Required Field</p>
	<?php
	$temp_content = ob_get_contents();
	ob_end_clean();

	return $temp_content;
}

Code file location:

pmpro-register-helper/pmpro-register-helper/modules/register-form.php

Pmpro Register Helper [pmpro_signup] Shortcode

The pmpro_signup shortcode from the PMPro Register Helper plugin is designed to create a custom signup form for membership levels. It provides options to adjust the button text, display an intro, specify membership level, and more.

Shortcode: [pmpro_signup]

Parameters

Here is a list of all possible pmpro_signup shortcode parameters and attributes:

  • button – defines the text on the sign-up button
  • intro – toggles the display of the introduction text
  • level – specifies the membership level for sign-up
  • login – controls the display of the login link
  • short – toggles the display of the password confirmation and email confirmation fields
  • title – sets the title of the registration form

Examples and Usage

Basic example – Display a signup form for a membership level

[pmpro_signup level="3"]

Advanced examples

Display a signup form with a custom signup button text

[pmpro_signup level="3" button="Join Now"]

Display a signup form without the introductory text

[pmpro_signup level="3" intro="0"]

Display a signup form with a custom title and without the login option

[pmpro_signup level="3" title="Sign Up for Premium" login="0"]

Display a signup form with a short form (no password or email confirmation)

[pmpro_signup level="3" short="1"]

PHP Function Code

In case you have difficulties debugging what causing issues with [pmpro_signup] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode("pmpro_signup", "pmprorh_signup_shortcode");

Shortcode PHP function:

function pmprorh_signup_shortcode($atts, $content=null, $code="")
{
	// $atts    ::= array of attributes
	// $content ::= text within enclosing form of shortcode element
	// $code    ::= the shortcode found, when == callback name
	// examples: [pmpro_signup level="3" short="1" intro="0" button="Signup Now"]

	//make sure PMPro is activated
	if(!function_exists('pmpro_getLevel'))
		return "Paid Memberships Pro must be installed to use the pmpro_signup shortcode.";

	//set defaults
	extract(shortcode_atts(array(
		'button' => "Sign Up Now",
		'intro' => "0",
		'level' => NULL,
		'login' => true,
		'short' => NULL,
		'title' => NULL,
	), $atts));
	
	// set title
	if (isset($title))
		if(!empty($level))
			$title = 'Register For ' . pmpro_getLevel($level)->name;
		else
			
			$title = 'Register For ' . get_option('blogname');
	
	//turn 0's into falses
	if($login === "0" || $login === "false" || $login === "no")
		$login = false;
	else
		$login = true;

	if($short === "0" || $short === "false" || $short === "no")
		$short = false;
	else
		$short = true;

	if($intro === "0" || $intro === "false" || $intro === "no")
		$intro = false;

	// treat this page load as a checkout
	add_filter( 'pmpro_is_checkout', '__return_true' );
	
	// load recaptcha if needed
	if ( ! function_exists( 'pmpro_recaptcha_get_html' ) ) {
		pmpro_init_recaptcha();
	}

	global $current_user, $membership_levels;	
	
	ob_start();
	?>
		<?php if(!empty($current_user->ID) && pmpro_hasMembershipLevel($level,$current_user->ID)) { ?>
			<p><?php printf( esc_html__( 'You are logged in as %s.', 'pmpro-register-helper' ), $current_user->user_login ); ?></p>
		<?php } else { ?>
		<form class="pmpro_form pmpro_signup_form" action="<?php echo pmpro_url("checkout"); ?>" method="post">
			<h2><?php echo esc_html( $title ); ?></h2>
			<?php
				if(!empty($intro))
					echo wp_kses_post( wpautop($intro) );
			?>
			<input type="hidden" id="level" name="level" value="<?php echo esc_attr( $level ); ?>" />
			<?php
				if(!empty($current_user->ID))
				{
					?>
					<p id="pmpro_account_loggedin">
						<?php
						$allowed_html = array(
							'a' => array(
								'href' => array(),
								'target' => array(),
								'title' => array(),
							),
							'strong' => array(),
						);
						echo wp_kses( sprintf( __('You are logged in as <strong>%s</strong>. If you would like to use a different account for this membership, <a href="%s">log out now</a>.', 'pmpro-register-helper'), $current_user->user_login, esc_url( wp_logout_url( $_SERVER['REQUEST_URI'] ) ) ), $allowed_html );
						?>
					</p>
					<?php
				}
				else
				{
					?>
					<div>
						<label for="username"><?php esc_html_e( 'Username', 'pmpro-register-helper' ); ?></label>
						<input id="username" name="username" type="text" class="input" size="30" value="" />
					</div>
					<?php do_action("pmpro_checkout_after_username");?>
					<div>
						<label for="password"><?php esc_html_e( 'Password', 'pmpro-register-helper' ); ?></label>
						<input id="password" name="password" type="password" class="input" size="30" value="" />
					</div>
					<?php if($short) { ?>
						<input type="hidden" name="password2_copy" value="1" />
					<?php } else { ?>
						<div>
							<label for="password2"><?php esc_html_e( 'Confirm Password', 'pmpro-register-helper' ); ?></label>
							<input id="password2" name="password2" type="password" class="input" size="30" value="" />
						</div>
					<?php } ?>
					<?php do_action("pmpro_checkout_after_password");?>
					<div>
						<label for="bemail"><?php esc_html_e( 'E-mail Address', 'pmpro-register-helper' ); ?></label>
						<input id="bemail" name="bemail" type="email" class="input" size="30" value="" />
					</div>
					<?php if($short) { ?>
						<input type="hidden" name="bconfirmemail_copy" value="1" />
					<?php } else { ?>
						<div>
							<label for="bconfirmemail"><?php esc_html_e( 'Confirm E-mail', 'pmpro-register-helper' ); ?></label>
							<input id="bconfirmemail" name="bconfirmemail" type="email" class="input" size="30" value="" />
						</div>
					<?php } ?>
					<?php do_action("pmpro_checkout_after_email");?>
					<div class="pmpro_hidden">
						<label for="fullname"><?php esc_html_e( 'Full Name', 'pmpro-register-helper' ); ?></label>
						<input id="fullname" name="fullname" type="text" class="input" size="30" value="" /> <strong><?php esc_html_e( 'LEAVE THIS BLANK', 'pmpro-register-helper' ); ?></strong>
					</div>

					<div class="pmpro_captcha">
						<?php
							global $recaptcha, $recaptcha_publickey;							
							if($recaptcha == 2 || (!empty($level) && $recaptcha == 1 && pmpro_isLevelFree(pmpro_getLevel($level))))
							{
								echo pmpro_recaptcha_get_html($recaptcha_publickey, NULL, true);
							}
						?>
					</div>
					<?php
				}
			?>
			<div>
				<span id="pmpro_submit_span" >
					<input type="hidden" name="submit-checkout" value="1" />
					<input type="submit" class="pmpro_btn pmpro_btn-submit-checkout" value="<?php echo esc_attr( $button ); ?>" />
				</span>
			</div>
			<?php if(!empty($login) && empty($current_user->ID)) { ?>
			<div style="text-align:center;">
				<a href="<?php echo esc_url( wp_login_url(get_permalink() ) ); ?>"><?php esc_html_e('Log In','pmpro-register-helper'); ?></a>
			</div>
			<?php } ?>
		</form>
		<?php } ?>
	<?php
	$temp_content = ob_get_contents();
	ob_end_clean();
	return $temp_content;
}

Code file location:

pmpro-register-helper/pmpro-register-helper/shortcodes/pmpro_signup.php

Conclusion

Now that you’ve learned how to embed the Pmpro Register Helper Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *