[wcj_order_checkout_field]

Display WooCommerce order any checkout field by id

Description

[wcj_order_checkout_field] shortcode displays WooCommerce order any checkout field by id.

Args

field_id
(required) Order field ID.

Default: None
before
(optional) Text to place before the content. If content is empty this argument is ignored.

Default: None
after
(optional) Text to place after the content. If content is empty this argument is ignored.

Default: None
visibility
(optional) User visibility. Possible values are WordPress user roles (including custom), e.g. administrator, shop_manager, customer etc.

Default: all
location
(optional) Make shortcode results visible only to customers from specific country (by user IP). Value is two letter country code.

Default: all

Examples

Billing Phone

[wcj_order_checkout_field field_id="billing_phone"]

Billing Email

[wcj_order_checkout_field field_id="billing_email"]

Custom Billing Checkout Field

[wcj_order_checkout_field field_id="billing_wcj_checkout_field_1"]

Default WooCommerce Order Fields

billing_first_name The billing address first name.
billing_last_name The billing address last name.
billing_company The billing address company.
billing_address_1 The first line of the billing address.
billing_address_2 The second line of the billing address.
billing_city The city of the billing address.
billing_state The state of the billing address.
billing_postcode The postcode of the billing address.
billing_country The country of the billing address.
billing_phone The billing phone number.
billing_email The billing email.
shipping_first_name The shipping address first name.
shipping_last_name The shipping address last name.
shipping_company The shipping address company.
shipping_address_1 The first line of the shipping address.
shipping_address_2 The second line of the shipping address.
shipping_city The city of the shipping address.
shipping_state The state of the shipping address.
shipping_postcode The postcode of the shipping address.
shipping_country The country of the shipping address.
cart_discount Total amount of discount.
cart_discount_tax Total amount of discount applied to taxes.
customer_user User ID who the order belongs to. 0 for guests.
order_key Random key/password unqique to each order.
order_tax Stores order tax total.
order_shipping_tax Stores shipping tax total.
order_shipping Stores shipping total.
order_total Stores order total.
order_currency Stores currency code used for the order.
payment_method method ID.
payment_method_title Name of the payment method used.
customer_ip_address Customer IP Address.
customer_user_agent Customer User agent.
customer_note Order Notes
Recommended for PDF Invoicing and Packing Slips module
Accessible through:
  • [wcj_order_checkout_field]
Tested on WooCommerce 3.0.9 and WordPress 4.8
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

4 Comments

  1. Tom October 6, 2015 at 9:54 am #

    I’m trying to put out [wcj_order_checkout_field field_id="billing_last_name"] in the invoice-template but nothing shows up. Any ideas / help?

    Reply

    • Valentin Solovjov October 6, 2015 at 10:28 pm #

      Hi,

      found/fixed bug in wcj_order_checkout_field, please update to the latest version of Booster for WooCommerce and try again.
      Also you can try different shortcode : [wcj_order_meta meta_key="_billing_last_name"]

      BR,
      Val

  2. Simon May 11, 2016 at 3:42 am #

    Where can I find all the billing info in [wcj_order_checkout_field]? like first/last name, company name, address….
    Also I can’t find [wcj_order_meta]
    Thank you

    Reply

    • Booster Support Team May 11, 2016 at 11:24 am #

      Hi,

      I’ve added list of default WooCommerce order fields to the documentation above, please take a look.

      Regarding [wcj_order_meta] shortcode – unfortunately no documentation available yet, but basically this shortcode will display any order meta value, e.g. [wcj_order_meta meta_key="_billing_last_name"].

      Best regards,
      Tom

      Booster Support Team