How to Change the SureCart Customer Dashboard Links

In this tutorial, I’ll show you how to change the links in the SureCart customer dashboard. Specifically, we’ll update the “Back Home” button and the store logo URL to direct users to a specific page or an entirely different website. This customization can enhance the user experience by directing customers to relevant areas, such as a membership page or community platform.

Prerequisites

Before we begin, ensure that you are using a child theme for your WordPress site. If you’re not familiar with child themes or need to create one, you can find tutorials online specific to your WordPress theme.

For this tutorial, I’ll be using the Astra theme with a child theme already enabled. Astra has a Child Theme generator that you can use to customize a Child Theme. Enter your information download the theme, install it like you would any other theme, and activate it. Make sure you have Astra installed alongside it.

Step-by-Step Guide

1. Accessing the Theme File Editor

  1. Log in to WordPress: Log in to your WordPress dashboard.
  2. Navigate to Theme File Editor: On the left-hand side menu, go to Appearance and then select Theme File Editor.

2. Editing the functions.php File

  1. Select functions.php: In the Theme File Editor, find and click on functions.php from the list of theme files on the right.
  2. Add the Functions: Scroll down to the bottom of the functions.php file and add the following functions:
add_filter('sc_customer_dashboard_back_home_url', function( $url ) {
    return 'https://members.convology.com/';
});

add_filter('sc_customer_dashboard_store_logo_url', function( $url ) {
    return 'https://members.convology.com/';
});

These functions use the add_filter hook to change the URLs for the “Back Home” button and the store logo in the SureCart customer dashboard. Replace 'https://members.convology.com/' with the URL you want your users to be directed to.

3. Updating the File

  1. Save Changes: After pasting the code, click Update File to save your changes.

4. Verifying the Changes

  1. View the Customer Dashboard: Navigate back to your WordPress dashboard, go to Pages, and find your customer dashboard page.
  2. Click View: Click View to see the customer dashboard.
  3. Test the Links: Click on the “Back Home” button and the store logo to ensure they direct you to the new URL you specified.

Example Use Cases

Redirecting to a Membership Page

You might want to send users to a specific membership page rather than the root of your website. For example, if you have a members-only area where users access their content or their purchase, you can set the URL to that page.

Redirecting to a Community Platform

If you’re integrating SureCart with a community platform like Circle or BuddyBoss, you can direct users back to their community dashboard. This creates a seamless experience where users can manage their purchases and subscriptions without leaving the community environment.