Home / Archive / MemberPress: Modify “Back to Home” Text And Link on Thank You Page
Duplicate Snippet

Embed Snippet on Your Site

MemberPress: Modify “Back to Home” Text And Link on Thank You Page

This snippet changes the text and link of the "Back to Home" button or link (inside the invoice-wrapper class) on MemberPress Thank You page shown after a successful purchase.

The sample code will replace the default text to the “Proceed to Members Area” text, and will take users to the custom "https://yoursite.com/custom-page" URL.

To adjust the desired redirection link, the dummy "https://yoursite.com/custom-page" URL should be replaced with the URL of the actual page users should be redirected to, on this line:

$('.invoice-wrapper.thankyou').children('p').html('Proceed to Members Area');

On the same line, the button/link text can be modified by replacing the dummy "Proceed to Members Area" text with the new text.

Code Preview
php
<?php
add_action('wp_footer', function() {
	?>
	<script>
		(function($) {
			$(document).ready(function() {
				// Change "Back to Home" text and link to a custom URL
				$('.invoice-wrapper.thankyou').children('p').html('<a href="https://yoursite.com/custom-page">Proceed to Members Area</a>');
			});
		})(jQuery);
	</script>
	<?php
});

Comments

Add a Comment