---
title: Surecart Tabbed Customer Dashboard
date: 2025-03-01T12:23:01Z
modified: 2026-09-22T19:51:44Z
permalink: "https://techarticles.co.uk/surecart-tabbed-customer-dashboard/"
type: post
status: publish
excerpt: ""
wpid: 4585
categories:
  - Blog
  - Coding
  - Plugins
  - SureCart
  - Wordpress
timestamp: 2026-09-22T19:51:44Z
tags:
  - Blog
  - Coding
  - Plugins
  - SureCart
  - Wordpress
---

While working on Ticket Manager Pro for [SureCart](https://ta0.uk/surecart) I have been looking at ways to make the dashboard experience as easy as possible for users and have added a feature to bring back this now hidden option, which I use a lot in my surecard sites.

Firstly, you can read a little about why this was hidden on [wordpress.org,](https://wordpress.org/support/topic/tabbed-customer-dashboard-deprecated/) but for this very quick write-up, I will just let you know it was because the support tickets were raised because of misunderstandings or misuse of the block itself.

Getting the block back is simple, and Adam supplied the code to do so. This is the first snippet we will be adding to our snippets programme or our functions.php

```
<span class="line"><span style="color: #F97583"><?</span><span style="color: #79B8FF">php</span></span>
<span class="line"><span style="color: #B392F0">add_filter</span><span style="color: #E1E4E8">(</span></span>
<span class="line"><span style="color: #E1E4E8"> </span><span style="color: #9ECBFF">'block_type_metadata'</span><span style="color: #E1E4E8">,</span></span>
<span class="line"><span style="color: #E1E4E8"> </span><span style="color: #F97583">function</span><span style="color: #E1E4E8">( $metadata ) {</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #F97583">if</span><span style="color: #E1E4E8"> ( </span><span style="color: #9ECBFF">'surecart/customer-dashboard'</span><span style="color: #E1E4E8"> </span><span style="color: #F97583">==</span><span style="color: #E1E4E8"> $metadata[</span><span style="color: #9ECBFF">'name'</span><span style="color: #E1E4E8">] ) {</span></span>
<span class="line"><span style="color: #E1E4E8">   $metadata[</span><span style="color: #9ECBFF">'supports'</span><span style="color: #E1E4E8">][</span><span style="color: #9ECBFF">'inserter'</span><span style="color: #E1E4E8">] </span><span style="color: #F97583">=</span><span style="color: #E1E4E8"> </span><span style="color: #79B8FF">true</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">  }</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #F97583">return</span><span style="color: #E1E4E8"> $metadata;</span></span>
<span class="line"><span style="color: #E1E4E8"> }</span></span>
<span class="line"><span style="color: #E1E4E8">);</span></span>
```PHP

This will now give you a new option in the Guttenberg editor, which looks like the icon below, and this is what we will be using

![Icon of a tabbed customer dashboard with a grid and plus sign.](https://techarticles.co.uk/wp-content/uploads/2025/03/tabbed-customer-dashboard-icon.png)

This allows us to build an alternative dashboard page for SureCart, and that is what we have done in the example below. In my example, this allows us to view Ticket Manager Pro Tickets in our dashboard in their own dedicated tab.

![Customer dashboard with tabs for Tickets, Account, Logout, New Tab 4, and Orders, showing ticket details section.](https://techarticles.co.uk/wp-content/uploads/2025/03/tabbed-customer-dashboard-example-icon-change.png)

The good thing about this is it is all built using Guttenberg, which means all your blocks and options work, including that fantastic but often forgotten WordPress function of shortcodes in the above block. We have added the native SureCart Customer Invoice block below a shortcode box to display the ticket manager pro download block

![Example of a new customer dashboard with tabs for tickets, orders, account, and logout options.](https://techarticles.co.uk/wp-content/uploads/2025/03/tabbed-customer-dashboard-example.gif)

The default icons for the tag were a bit limited for me, so by the power of CSS ,I have swapped it out for an uploaded SVG fil,e and the CSS code for that is below

```
<span class="line"><span style="color: #6A737D">/* Target the sc-icon inside the tickets tab via its href */</span></span>
<span class="line"><span style="color: #F97583">.</span><span style="color: #79B8FF">page</span><span style="color: #F97583">-</span><span style="color: #79B8FF">id</span><span style="color: #F97583">-</span><span style="color: #79B8FF">163</span><span style="color: #E1E4E8"> </span><span style="color: #79B8FF">sc</span><span style="color: #F97583">-</span><span style="color: #79B8FF">tab</span><span style="color: #E1E4E8">[</span><span style="color: #79B8FF">href</span><span style="color: #F97583">*=</span><span style="color: #9ECBFF">"?tab=tickets"</span><span style="color: #E1E4E8">] </span><span style="color: #79B8FF">sc</span><span style="color: #F97583">-</span><span style="color: #79B8FF">icon</span><span style="color: #E1E4E8">[</span><span style="color: #79B8FF">slot</span><span style="color: #F97583">=</span><span style="color: #9ECBFF">"prefix"</span><span style="color: #E1E4E8">] {</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #6A737D">/* Remove the existing icon display */</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #B392F0">color</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">transparent</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #6A737D">/* Apply your custom SVG as a background image */</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #79B8FF">background</span><span style="color: #F97583">-</span><span style="color: #79B8FF">image</span><span style="color: #E1E4E8">: </span><span style="color: #B392F0">url</span><span style="color: #E1E4E8">(</span><span style="color: #9ECBFF">'https://yourwebsite.com/wp-content/uploads/check-ticket-icon.svg'</span><span style="color: #E1E4E8">);</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #79B8FF">background</span><span style="color: #F97583">-</span><span style="color: #79B8FF">size</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">contain</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #79B8FF">background</span><span style="color: #F97583">-</span><span style="color: #79B8FF">repeat</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">no</span><span style="color: #F97583">-</span><span style="color: #79B8FF">repeat</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #B392F0">display</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">inline</span><span style="color: #F97583">-</span><span style="color: #79B8FF">block</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #B392F0">width</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">18px</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #B392F0">height</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">18px</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #6A737D">/* In case the sc-icon renders an inline SVG, hide it */</span></span>
<span class="line"><span style="color: #F97583">.</span><span style="color: #79B8FF">page</span><span style="color: #F97583">-</span><span style="color: #79B8FF">id</span><span style="color: #F97583">-</span><span style="color: #79B8FF">163</span><span style="color: #E1E4E8"> </span><span style="color: #79B8FF">sc</span><span style="color: #F97583">-</span><span style="color: #79B8FF">tab</span><span style="color: #E1E4E8">[</span><span style="color: #79B8FF">href</span><span style="color: #F97583">*=</span><span style="color: #9ECBFF">"/?tab=tickets"</span><span style="color: #E1E4E8">] </span><span style="color: #79B8FF">sc</span><span style="color: #F97583">-</span><span style="color: #79B8FF">icon</span><span style="color: #E1E4E8">[</span><span style="color: #79B8FF">slot</span><span style="color: #F97583">=</span><span style="color: #9ECBFF">"prefix"</span><span style="color: #E1E4E8">] </span><span style="color: #F97583">></span><span style="color: #E1E4E8"> </span><span style="color: #79B8FF">svg</span><span style="color: #E1E4E8"> {</span></span>
<span class="line"><span style="color: #E1E4E8">  </span><span style="color: #B392F0">display</span><span style="color: #E1E4E8">: </span><span style="color: #79B8FF">none</span><span style="color: #E1E4E8">;</span></span>
<span class="line"><span style="color: #E1E4E8">}</span></span>
<span class="line"></span>
```PHP

In the above snippet it’s important to note the following items

- **.page-id-163** This limits the code to run only on this page You can remove this if you are using a pattern or don’t mind that the CSS will load on every page
- **?tab=tickets** This is telling it what tab to target and swap out the SVG

With the above CSS targeting each individual tab, you could have as many as you need with individual icons for each, and you can add any Gutenberg content you need to the tabs.

The below video shows you this all in action and how I have created the ticket page

![](https://i.ytimg.com/vi/9H_UR_X5P3w/maxresdefault.jpg)