WooCommerce SMS variables and order meta

Updated on Jan 30, 2023

In this guide, the various SMS variables available for customizing messages in WooCommerce are thoroughly explained. You can use any of them in the text, in the order and placement that best suits your needs!

The below details outline the integration capabilities of WP SMS Pro with WooCommerce, along with the variables utilized in the customization of messages for each feature.

To access the WooCommerce features in WP SMS, simply navigate to SMS → Settings → WooCommerce.

Mobile Verification Variables

Two-Factor Authentication via SMS (2FA) is offered by WP SMS for customer mobile verification. This functionality allows for verification of the user’s mobile number by sending a one-time password to the number provided.

The mobile number can be verified through the standard WordPress form.

  • %otp_code% : The code to verify the input number can be put anywhere in your SMS text

Notify for new product

With every new product added to your offerings, you have the option to send a personalized SMS to a selected group of subscribers to keep them informed of the new additions.

  • %product_id% Product ID
  • %product_title% Title of the product
  • %product_url% URL of the product
  • %product_date% Date of the product
  • %product_price% Product Regular price
  • %product_sale_price% Product sale price
  • %product_description% Description of the product
  • %product_height% Height of the product
  • %product_weight% Weight of the product
  • %product_width% Width of the product
  • %product_stock_quantity% Stock of the product
  • %product_availability% Availability of the product

Notify for new order

With every new order placed, you can receive a customized SMS detailing all aspects of the order. You also have the option to determine who will receive the order information, so even your administrators can receive an SMS with the details.

  • %billing_first_name% First name of the client
  • %billing_last_name% Last name of the client
  • %billing_company% Company name of the client
  • %billing_address% The address of the client
  • %order_edit_url% The URL to edit the order
  • %billing_phone% Phone number of the client
  • %order_number% Number of the order
  • %order_total% The total price of the order items with tax
  • %order_total_currency% The currency by which the order was paid by
  • %order_total_currency_symbol% The currency symbol by which the order was paid by
  • %order_pay_url% The URL to complete the order by payment
  • %order_id% Id number of the order
  • %order_items% Items in the order separated by comma (,)
  • %status% Status of the order
  • %order_meta_{key-name}% To explain more about the order meta, see the example. Plugin WooCommerce ShipStation stores the tracking number in meta key tracking_number, so you can get it by %order_meta_tracking_number%

Notify to customer order

With each new order placed, you have the option to send a personalized SMS to your customers that includes all the details of their order. By enabling this feature, your customers will receive a text message with their order information right after they complete their order.

  • %billing_first_name% First name of the client
  • %billing_last_name% Last name of the client
  • %billing_company% Company name of the client
  • %billing_address% The address of the client
  • %order_edit_url% The URL to edit the order
  • %billing_phone% Phone number of the client
  • %order_number% Number of the order
  • %order_total% The total price of the order items with tax
  • %order_total_currency% The currency by which the order was paid by
  • %order_total_currency_symbol% The currency symbol by which the order was paid by
  • %order_pay_url% The URL to complete the order by payment
  • %order_id% Id number of the order
  • %order_items% Items in the order separated by comma (,)
  • %status% Status of the order
  • %order_meta_{key-name}% To explain more about the order meta, see the example. Plugin WooCommerce ShipStation stores the tracking number in meta key tracking_number, so you can get it by %order_meta_tracking_number%

Notify of stock

By enabling this feature, you can get a customized SMS notification with the product ID or Product name when the stock is running low. The notification recipient can also be specified, allowing administrators to receive the stock update via SMS.

  • %product_id% Product ID
  • %product_title% Title of the product
  • %product_url% URL of the product
  • %product_date% Date of the product
  • %product_price% Product Regular price
  • %product_sale_price% Product sale price
  • %product_description% Description of the product
  • %product_height% Height of the product
  • %product_weight% Weight of the product
  • %product_width% Width of the product
  • %product_stock_quantity% Stock of the product
  • %product_availability% Availability of the product

Notify of status

By enabling this feature, you can send a personalized text message to a customer whenever the status of their order changes, regardless of what the new status is.

  • %billing_first_name% First name of the client
  • %billing_last_name% Last name of the client
  • %billing_company% Company name of the client
  • %billing_address% The address of the client
  • %order_edit_url% The URL to edit the order
  • %billing_phone% Phone number of the client
  • %order_number% Number of the order
  • %order_total% The total price of the order items with tax
  • %order_total_currency% The currency by which the order was paid by
  • %order_total_currency_symbol% The currency symbol by which the order was paid by
  • %order_pay_url% The URL to complete the order by payment
  • %order_id% Id number of the order
  • %order_items% Items in the order separated by comma (,)
  • %status% Status of the order
  • %order_meta_{key-name}% To explain more about the order meta, see the example. Plugin WooCommerce ShipStation stores the tracking number in meta key tracking_number, so you can get it by %order_meta_tracking_number%

Notify by status

Using this feature, you can send a customized SMS to a customer when their order status is changed but in this case, you have to define an order status and a notify status. Therefore by transitioning between those statuses, the customer will receive an SMS.

  • %billing_first_name% First name of the client
  • %billing_last_name% Last name of the client
  • %billing_company% Company name of the client
  • %billing_address% The address of the client
  • %order_edit_url% The URL to edit the order
  • %billing_phone% Phone number of the client
  • %order_number% Number of the order
  • %order_total% The total price of the order items with tax
  • %order_total_currency% The currency by which the order was paid by
  • %order_total_currency_symbol% The currency symbol by which the order was paid by
  • %order_pay_url% The URL to complete the order by payment
  • %order_id% Id number of the order
  • %order_items% Items in the order separated by comma (,)
  • %status% Status of the order
  • %order_meta_{key-name}% To explain more about the order meta, see the example. Plugin WooCommerce ShipStation stores the tracking number in meta key tracking_number, so you can get it by %order_meta_tracking_number%

Now you know all the variables you might need in an SMS. Whether it’s for customers or your own admins.