[wcj_customer_meta]

Display WooCommerce customer's meta field

Description

[wcj_customer_meta] shortcode displays current WooCommerce customer’s meta field. If user is not logged in, nothing is displayed. Please note that if you need to show customer’s meta in Booster’s PDF invoice, you need to use [wcj_order_customer_meta] shortcode.

Args

key
(required) Meta field key to display.

Default: None

Examples

[wcj_customer_meta key="first_name" before="Hi, " after="!"]

Here are some meta fields keys you can display with [wcj_customer_meta] shortcode:

billing_address_1
billing_address_2
billing_city
billing_country
billing_email
billing_eu_vat_number
billing_first_name
billing_last_name
billing_phone
billing_postcode
billing_state
description
first_name
last_name
nickname
shipping_address_1
shipping_address_2
shipping_city
shipping_country
shipping_first_name
shipping_last_name
shipping_method
shipping_postcode
shipping_state
Accessible through:
  • [wcj_customer_meta]
Tested on WooCommerce 3.3.1 and WordPress 4.9.4
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

3 Comments

  1. zimart_snk February 7, 2018 at 7:12 am #

    Is it possible to show different – custom customer fields?

    Reply to thread

    • zimart_snk February 7, 2018 at 7:12 am #

      ex logo…

    • Booster Support Team February 8, 2018 at 1:05 pm #

      Hi,

      Yes, there should be no problem showing custom fields. You just have to know the key. If [wcj_customer_meta key="logo"] is not working, please try adding underscore symbol to the key, i.e.: [wcj_customer_meta key="_logo"].

      Hope that helps.

      Best regards,
      Tom

      Booster Support Team