Black Friday Sale: up to 80% off every Pro plan

Ends Dec 15 at 6:59 pm EST. See pricing

Variables in WooCommerce messages

FAQ

Written for Chat Help 3.8.2 and Chat Help Pro 3.8.2

Free Works in Chat Help Free and Pro.

Use dynamic variables in the WooCommerce button to fill in the product, cart or order for the shopper.

Where to use dynamic variables in the WooCommerce button #

Dynamic variables in the WooCommerce button: The Product Page settings of the Chat Help WooCommerce buttons

WooCommerce messages accept {productName}, {productSku}, {productSlug}, {productPrice}, {productRegularPrice}, {productSalePrice}, {productStockStatus}, {productAttributes} and {productAttributeValues}; the cart page adds {cartInfo}, the thank-you page {orderInfo}.

Hello! I’d like to ask about {productName} (SKU: {productSku}).
{PRODUCT_START}Price: {productPrice}{SALE_START} (regular: {productRegularPrice}){SALE_END}
Stock: {productStockStatus}{PRODUCT_END}

{PRODUCT_START}…{PRODUCT_END} shows text only on a product; {SALE_START}…{SALE_END} only when it is on sale.

Which variables work where #

  • Product and shop pages: the product variables.
  • Cart and checkout: {cartInfo}, the items with quantity and price, subtotal, tax and total; the checkout adds {shipping}.
  • Thank-you page: {orderInfo}, with the parts you choose in the button settings.

Variable products #

  • {productAttributes} sends the picked options with their names, e.g. “Color: Red, Size: M”, and stays empty until the shopper picks a variation.
  • {productAttributeValues} sends only the values, e.g. “Red, M”.
  • The button’s link updates as soon as the shopper changes their choice.

Dynamic variables in the WooCommerce button: still have a question? Ask in the Chat Help forum on WordPress.org (opens in a new tab), or open a support ticket with Pro.

Was this article helpful?

Turn visitors into WhatsApp conversations

Start free from WordPress.org. Upgrade to Pro for team chat with several agents, the Advance button, dark mode, unlimited form fields, visibility rules and webhooks.

Chat Help Demo
ThemeAtelier
Typically replies within 1 minute.