Site logo

Archived topic

Change topbar text by user role

3 replies · Started by Shawn on December 23, 2019

Viewing posts 1–4 of 4

Hi,

So this one is a bit tricky. The client has 2 different free shipping minimums. 1 for customer role, the other for wholesale. They'd like that in the topbar but there are a couple of problems. They don't want one role seeing the other's minimum. Also, putting both in topbar takes up too much space on mobile.

So, is there any way to specify the information shown per role?
I had thought of using the WooCommerce store notice to show only wholesale but can't figure out how to only display that to a single role.

Hi there,

you could use a Hook Element to display the content based on User Role.
Check the Display Rules > Users to see if the 'wholesale customer' role is visible.

https://docs.generatepress.com/article/hooks-element-overview/

If it is then Try the before_header hook to add your message HTML. And simply create a new hook for each customer role.

Oh bloody hell I completely forgot about hooks. 🤦‍♂️

Many thanks

haha :) You're welcome

This archived topic is closed to new replies.