Skip to content

Woo ‐ Customer Dynamic Tags

Soczó edited this page Nov 1, 2024 · 1 revision

Table of Contents

Description

Customer specific tags are tags that retrieve certain information about a logged in user. You can use most tags anywhere, but they always return empty if the visitor is not logged in.

Customer Details

Usage: Anywhere on your site

This tag retrieves Woocommerce values specific to the currently logged in user, billing and shipping addresses (city, phone number, company email, etc.) It retrieves the data that is saved in the user's profile.

image

Completed Order

Usage: Anywhere on your site

Returns the number of all completed orders of the current user. It only returns a number.

Purchased Products

Usage: Anywhere on your site

This returns a list of all products purchased at least once by that current user. Product name or ID output. If you are retrieving product names, you can also specify a linking option and whether to take you to the product page or to the order page (myaccount)

image

Total spent

Usage: Anywhere on your site

Returns how much the user has spent on the webshop so far. It uses wc get_total_spent.

My Account Menu Links

image

Returns links to the default and custom endpoints of my account (if they were created correctly), some custom endpoints may not be listed (rare case)

Last Order

You can select the details of the current user's last order for a wide range of order details.

image

User role

Returns the name of the current user role (in human readable format)

Clone this wiki locally