fbpx
Category - Orders - Booster for WooCommerce Category - Orders - Booster for WooCommerce

Category – Orders

[wcj_order_customer_meta] #

Overview

This shortcode displays the value of any meta key (passed as an argument to it) related to the customer data, belonging to the current order. Using it, you can add the details such as billing info, shipping info, and parts of the customer name to your invoices, order emails, and WooCommerce order pages. It can be used

Args

  • You must use the attribute key with this shortcode. In this attribute, pass the name of the meta field to fetch its value. 
  • Add the order_id details to fetch the order customer data related to a particular order. The default value of this attribute is the current order ID.

Besides these, any of the common Booster Shortcode Args can also be used with it.

Syntax

[wcj_order_customer_meta key=“meta-key-name” attr2=“value-2” attr3=“value-3” …]

A few meta-keys you may use with the [wcj_order_customer_meta] shortcode are:

billing_address_1
billing_address_2
billing_city
billing_country
billing_email
billing_eu_vat_number
billing_first_name
billing_last_name
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
billing_phone
billing_postcode

Example

  • Hi [wcj_order_customer_meta key=“first-name”], How are you?
  • [wcj_order_customer_meta key=“shipping_postcode” before=“Shipping to (Postcode)”]

[wcj_order_status_label] #

Overview

This shortcode outputs the label describing the order status for the current order ID, or the order ID passed as an argument to the shortcode. Its produced output is very similar to the Booster shortcode [wcj_order_status]. It’s just that it returns the label string in a human-readable format, unlike the order status shortcode that returns it with hyphens and in small cases only. 

Here is an example showcasing the difference between the output of 2 shortcodes:

Args 

You may use the following attributes with this shortcode:

Possible Usage

  • In invoice templates created using the PDF Invoicing & Packing Slips Plugin.
  • On any page when the order_id is passed, especially in the pages like order.php, view_order.php to customize them for your eCommerce store.

Suggestion: Use the Template Editor Plugin – Booster to modify WooCommerce template files.

Example Input: 

[wcj_order_status_label before=”Output: “]

OR

$scode=’[wcj_order_status_label before=”Output: ” order_id=”‘.$order_id.'”]‘;

echo do_shortcode($scode);

[wcj_order_total_length] #

Overview  

This shortcode sums the length (dimension) of all ordered products for the current or selected order and outputs the result. For example, if the order contains 4 Chocolate Cakes and their length is 45cm each, the output will be 180

Suggestion: You may use the unit of length (as being used in your store) with the after attribute to give your store users the context.

Args 

  • order_id – (Required except for with Booster Invoice Templates) – The integer ID assigned to the order in question.
  • hide_if_zero – Hide the output if the length is zero by setting its value as `yes`. The default value is `no`.
  • after Optional The suffix text for the shortcode’s output.
  • before Optional The prefix text for the shortcode’s output.
  • Common attributes from the categories All and Orders.

Possible Usage

To help buyers estimate the overall length of products they’ve ordered:

Example

[wcj_order_total_length before=”Total length: ” after=” cm” hide_if_zero=”yes”]

[wcj_order_total_height] #

Overview

Use the [wcj_order_total_height] shortcode to display the total height of ordered items for an order. You may specify the order ID or show the output for the current order ID. The latter is only possible when you are using it in the templated created using the PDF Invoicing and Packing Slips Plugin. In all other cases, you must use the order_id attribute with it.

Args 

  • order_id – The WooCommerce order ID
  • hide_if_zero – Its value can be `yes` or `no`. Use it to hide or show the zero output.
  • Any common Booster attribute belonging to the categories All and Orders.

Possible Usage

Specifying the total order height can help you justify the export duty and shipping charges in your store. These details can be shown in:

Example

[wcj_order_total_height before=”Total height: ” hide_if_zero=”yes”]

[wcj_order_total_width]  #

Overview 

The overall width of the ordered items related to a particular order (the current one or by order ID) can be displayed to the store buyers using this shortcode. For the global eCommerce stores or the orders selling the products of notable dimensions, it will be particularly helpful.

The order_id attribute is compulsory with the [wcj_order_total_width] shortcode, except for when it is being used with the PDF invoicing & Packing Slips Plugin by Booster.

Args

  • order_id – The ID of the order, for which, you want to display the width of the total items.
  • hide_if_zero – `Yes` to hide when the output is zero and `no` to avoid hiding it.
  • Any common Booster attribute.

Possible Usage 

Example

[wcj_order_total_width before=”Sum of width of all items ordered: ” after=” cm”]

#

Overview

The [wcj_order_total_weight] shortcode sums and displays the total weight of the items related to an order. While you need to pass the order_id with it in most cases, it will work for the current order when used in the automated templates of the PDF invoicing and Packing Slips plugin.

Args

  • order_id – You need to pass the numeric order ID in this attribute to retrieve the total order weight. Its default value is the current order ID. 
  • hide_if_zero – Set its value as ‘yes’ to hide and ‘no’ to show, when the output is zero.
  • Any of the common Booster attributes

Possible Usage

As the shipping cost and its method might differ due to the total order weight, you might want to show this detail to your buyers in invoices, packing slips, order summary page, etc. With Booster, doing so is easy. Here are 2 possible ways of doing so:

Example

[wcj_order_total_weight before=”Weight ” after=” kg” hide_if_zero=”yes”]

[wcj_order_total_tax_after_refund]  #

Overview 

A WooCommerce refund may comprise the product cost, taxes, and shipping fee in general. So, if you want to fetch the total refunded amount in case of product return, you might want to show each of these details separately, especially in the case when you only refund the price of purchased items. The [wcj_order_total_tax_after_refund] will help you in this.

This shortcode can display the tax amount for a refunded order. Whether you want to tell buyers that this amount won’t be refunded or want to detail buyers on the tax amount refunded, it will be useful in both cases. 

Args

  • order_id Required (Except for when the current order ID is on the page) The numeric WooCommerce order ID.
  • hide_if_zero – Hides the output when the tax amount for the refunded order is zero.
  • hide_currency – Hides the currency symbol from the output.
  • Common Attributes belonging to the All Shortcodes and Orders shortcodes categories.

Possible Usage

Example

[wcj_order_total_tax_after_refund before=`Amount not refunded: ` after=`. Read the refund policy for more details.`]

[wcj_order_total_after_refund] #

Overview

This shortcode displays the total order amount after the refund. Though you need to pass the order_id attribute’s value in most of the cases with this shortcode, it can be used directly with the templates being created through Booster PDF Invoicing & Packing Slips Plugin

Args

  • order_id – To show the total amount after refund for a particular order by its ID.
  • excl_tax – To subtract the tax from the output amount (Values: `yes`, `no`)
  • hide_if_zero – To skip showing the output amount when it is zero (Values: `yes`, `no`)
  • hide_currency – To skip showing the currency sign with the output amount.
  • Shortcodes Common Attributes (except for the product_id) 

Possible Usage

  • To display the total amount that was not refunded clearly.
  • To improve how information is being transmitted to the buyers and to boost shopping experience.

Example

[wcj_order_total_after_refund before=”Total after refunds”]

See a few cases and their output when this shortcode is used:

  • If the full sum is refunded, the output will be zero (0);
  • If nothing is refunded, the total order amount will be displayed;
  • If there is a partial refund, the total will be shown accordingly;
  • If the tax/shipping amount is not refunded, the tax/shipping amount (or their sum) will be displayed as this shortcode’s output.

[wcj_order_refunds_table]  #

Overview

Let’s say an order was refunded partially twice. So, it may have more than one output detailing the order refunds. In such a case, you can use the [wcj_order_refunds_table] shortcode and display all the entries related to refunds for that order in the table format.

Note: Instead of the orders refund table shortcode, please use [wcj_order_items_table refunded_items_table=`yes`], when you want to display the items the buyer availed the refund for.

Args

  • columns – Add the column identifiers, separated by vertical bars ( | ), to define which details should be the part of the refunds table. You may add any, multiple, or all of these identifiers:
  • refund_number
  • refund_title
  • refund_reason
  • refund_reason_or_title
  • refund_amount
  • refund_items
  • columns_titles – Add table columns’ title, separated by vertical bars ( | ), in a sequence.
  • columns_styles – Add styles (inline CSS) separated by vertical bars ( | ) for the table here.
  • table_class –  It is the Booster HTML class for the resulting table.
  • price_prefix – Add a symbol (e.g., a minus (`-`)) before the refund_amount column.

Input Example

(Inserted in the view_order.php WooCommerce template using the Booster Template Editor plugin)

<p><b>

<?php 

$scode=’‘;

echo do_shortcode($scode);

?>

</b></p>

Output 

[wcj_order_coupons] #

Overview

This shortcode displays the coupons used while making an order. The output is either given for the current order or for any particular order by order ID. This shortcode works fine for the automated invoice templates you are configuring with the Booster PDF Invoicing & Packing Slips Plugin.

Args

Possible Usage

  • You may display the coupons applied on a particular order to your store admin/managers so that they could understand the applied discounts better. Use the visibility attribute for this purpose.
  • Use this shortcode in templates of various types of invoices or in custom document templates.

Example

[wcj_order_coupons before=”Coupon(s): “]

#

Overview

This shortcode prints the WooCommerce store user ID of the buyer/person placing an order for the current order or by the order ID. The output is the numeric value (order customer user ID) and can be used for administrative purposes.

Args

Possible Usage

  • Show user ID for any order to store admins using the visibility attribute.
  • Display user ID to your customers and use this information during resolving issues related to any order – for verifying the user’s identity.  
  • Add the user ID in invoices or customer documents, created using the Booster PDF Invoicing & Packing Slips Plugin, in your store.

Example

[wcj_order_customer_user before=”User ID of the One who placed this order is “]

[wcj_order_customer_user_roles] #

Overview

Display the user role(s) assigned to the person/user placing an order using this shortcode. It can be used in the invoice templates or customer document templates, as [wcj_order_customer_user_roles] works smoothly with the Booster PDF Invoicing & Packing Slips Plugin.

Args

  • order_id – The numeric WooCommerce order ID to find out the user role of the order user. Its default value is the current order ID.
  • Use any of the Shortcodes Common Attribute or Orders Attribute from this page with the shortcode [wcj_user_customer_user_roles].

Possible Usage

  • Display the user role type of the buyer to specific people (e.g. admins, store managers) in your store using the visibility attribute with this shortcode.
  • Use it in invoices, proforma, credit notes, and customs documents.
  • Justify different product pricing to your admin/staff by mentioning the user role in the invoices/order details.

Example

[wcj_order_customer_user_roles before=”User role of the Order User: “]

[wcj_order_payment_method_transaction_id] #

Overview

This shortcode displays the payment method transaction ID related to a particular order in the WooCommerce store. If being used with the invoice templates in the Booster PDF Invoicing & Packing Slips Plugin, it will automatically output the transaction ID related to the current order.

Args

  • order_id – The order ID, for which, the transaction ID needs to be displayed.
  • before – The prefix text/HTML for the output.
  • after – The postfix text/HTML for the output.
  • billing_country – To limit the shortcode output’s visibility to several billing countries.
  • not_billing_country –  To hide the output from several billing countries.
  • Besides this, you may also use other shortcodes Common Attributes and Orders attributes, if needed.

Possible Usage

  • To display the payment method transaction ID to buyers to avoid disputes or resolve them faster.
  • To show different payment method transaction ID formats for different billing countries using the attribute billing_country and/or not_billing_country.
  • To show payment method transaction ID to several user roles in the store using the attribute visibility.

Example

[wcj_order_payment_method_transaction_id before=”Transaction ID: “]

[wcj_order_total_excl_shipping] #

Overview 

This shortcode is mostly used with the Booster PDF Invoicing & Packing Slips Plugin when WooCommerce store owners want to show the order total (shipping amount excluded) in various types of invoices. 

You may also use [wcj_order_total_excl_shipping] with the attribute order_id in various WooCommerce templates (code files) to customize your store to show the shipping-exclusive order total to your buyers or several other user types.

Args 

  • order_id – Set its value as the order ID to show the related shipping-exclusive order total.  
  • excl_tax – Set its value as `yes` to exclude taxes, and `no` otherwise.
  • hide_if_zero – Set its value as `yes` to hide output when it is zero, and `no` otherwise.
  • hide_currency – Set its value as `yes` to hide the currency symbol, and `no` otherwise.
  • Other common or Orders Attributes

Possible Usage 

  • Display the shipping-exclusive order total in invoices or customer documents wherever needed.
  • Keep your buyers updated about the actual order total and shipping amount they are paying while making a purchase with you.

Example

[wcj_order_total_excl_shipping before=”Order Total Excluding Shipping: “]

[wcj_order_status] #

Overview

This shortcode output the current order’s status. You may pass the order ID using the order_id attribute with it, to view the order status for a particular order. Alternatively, instead of [wcj_order_status], you may use the shortcode [wcj_order_status_label] for a better-formatted output with almost similar details. 

Args

Possible Usage

  • In invoice and custom document templates
  • In WooCommerce page templates for customizing your shop’s order pages ( Use the Template Editor Plugin for this).

Example Input: 

[wcj_order_status before=”This order is currently “

[wcj_order_tax_by_class] #

Overview

This shortcode displays the tax applied on a particular order through a particular tax class. WooCommerce store owners can use it to show the class-related order tax by order ID or for the current order. 

Args

  • tax_class (Required) Specify the tax class, for which, you want to show the order tax.
  • order_id Specify the order ID, for which, you want to show the order tax.
  • hide_if_zero – It hides zero output. Set its value as `yes or `no`.
  • hide_currency It hides the currency symbol. Set its value as `yes or `no`.
  • The common or orders attributes.

Possible Usage

Example 

[wcj_order_tax_by_class tax_class=”reduced-rate”]

[wcj_order_subtotal_by_tax_class] #

Overview

Use this shortcode to display the order subtotal while including the tax being applied through a particular tax class. It can be done for the current order, or for a particular order through its ID. You will need to specify the name of the tax class using the tax_class attribute, essentially.

Args    

  • tax_class (Required) The WooCommerce tax class.
  • order_id The numeric order ID.
  • hide_if_zero – Hide or show zero output of this shortcode using this attribute. Set the value as `yes or `no`.
  • hide_currency Hide or show the currency symbol for the output using this attribute. Set the value as `yes or `no`.
  • Other common or orders attributes, as per your preference

Possible Usage

Example

[wcj_order_subtotal_by_tax_class tax_class=”reduced-rate”]

[wcj_order_total_by_tax_class] #

Overview

This shortcode displays the order total inclusive of the tax coming from a particular tax class in the WooCommerce store owners. The output will either be shown for the current order ID, or the order ID passed as an attribute value to the shortcode. 

Args 

  • tax_class (Required) Name the tax class to show the order total.
  • order_id Input the order ID, if you want to see the output for a particular order ID, other than current.
  • hide_if_zero – Hide or show the output using this attribute’s value (`yes or `no`) when the output is zero.
  • hide_currency Hide or show the currency symbol using this attribute’s value (`yes or `no`).
  • The common or orders attributes

Possible Usage 

  • Use the Template Editor Plugin or the child theme custom-add this detail on your store’s frontend for the buyers/users.

Example 

[wcj_order_total_by_tax_class tax_class=”reduced-rate”]

[wcj_order_custom_field]  #

Overview

If your order has custom fields added, you can use this shortcode to fetch the value of those fields using this shortcode. It can be used while customizing your invoices, custom documents, or orders pages, and adding the custom orders data in these pages/documents, 

[wcj_order_custom_field] requires ‘name’ as the required attribute, and for an array type custom field, you will have to use an additional attribute ‘key’, in case you want to details for a particular array element.

Note: It works with the PDF Invoicing and Packing Slips Plugin.

Args

  • name: The name of the custom field.
  • key: To be used with the name, if it is an array. It fetches the array element’s value.
  • Common args.

Example

[wcj_order_custom_field name=”my_custom_field”]

[wcj_order_custom_field name=”_adq_wpcf7″ key=”text-77″ before=”Field value: “]

[wcj_order_subtotal_plus_shipping]  #

Overview

This shortcode displays the sum of order subtotal and the shipping cost related to a particular order. For this, it will either take the current order’s ID (for example, in invoice templates, etc.) or require you to input the order ID details using the attribute order_id.

Args

  • order_id The order ID to show the order subtotal plus shipping amount.
  • hide_if_zero – The trigger to hide or show zero output. Value could be `yes or `no`.
  • hide_currency The trigger to hide or show the currency symbol. Value could be `yes or `no`.
  • Any of the common or Orders attributes can also be used with this shortcode.

Possible Usage 

Example

[wcj_order_subtotal_plus_shipping before=`Subtotal (Incl. Shipping): `]

[wcj_order_items_meta] #

Overview

It displays the order items’ meta details through their meta keys for a particular order. By default, it fetches the details related to the current order, but you can use the order_id attribute with it, in case you want order items meta related to a particular WooCommerce order.

For current orders, it works with:

Args

  • meta_key – (Required) The name of order items meta field.
  • order_id – The order ID to fetch meta field value for a particular WooCommerce order.
  • billing_country – To display the output for one or several billing countries.
  • not_billing_country – To hide the output for one or several billing countries.
  • before – To add some HTML content before the shortcode output.
  • after – To add some HTML content after the shortcode output.
  • The Orders Attributes or the other common attributes from this page.

Possible Usage

Add order items meta in your store’s invoices, custom documents, proforma invoices, credit notes, packing slips, etc. to display the order-related information.

Example

[wcj_order_items_meta meta_key=”_wcj_product_input_fields_global_1″]

[wcj_order_items_meta meta_key=”_wcj_product_input_fields_local_1″]

[wcj_order_total_fees_tax]  #

Overview

This shortcode displays the total tax applied on various fees in your WooCommerce store on a particular order. The details are fetched through order ID and by default, the current order’s details are outputted while you use [wcj_order_total_fees tax]

Note: The shortcode can be used in templates you create using the PDF Invoicing and Packing Slips Plugin without order ID and in WooCommerce templates edited through the Template Editor plugin with order ID. 

Args

  • order_id – Pass the ID of the order you want to display the fees tax for.
  • hide_currency – Enter `yes` to hide the currency sign for the output, and `no` to show it.
  • hide_if_zero – Enter `yes` to hide the output if zero, and `no` to show it.
  • visibility – Add a comma-separated list of user roles to enable output visibility for them only.
  • location – Add a comma-separated list of 2 characters long country codes to enable output visibility for them only.
  • site_visibility – Add a comma-separated list of page types to enable output visibility for them only.
  • wpml_language – Add a comma-separated list of WPML language codes to enable output visibility for them only.
  • not_wpml_language – Add a comma-separated list of WPML language codes to disable output visibility for them.
  • billing_country – Add a comma-separated list of billing countries (2-character long codes) to enable output visibility for them only.
  • not_billing_country – Add a comma-separated list of 2-character long country codes to disable output visibility for them.
  • payment_method – Add a comma-separated list of payment methods to enable output visibility for them only. 
  • not_payment_method – Add a comma-separated list of payment methods to enable output visibility for them only.

Read more on using these attributes here.

Possible Usage 

  • Display the tax on fees on your orders pages in the shop.
  • Add fee tax in invoices and custom documents.

Examples

  • [wcj_order_total_fees_tax before=`Tax on the fees applied: `]
  • <?php 

$scode=’‘;

echo do_shortcode($scode);

?>

[wcj_order_total_refunded] #

Overview

You may use this shortcode to display the total amount of refund made for a particular order. It shows the refund total whether it is made at once or at different times. For this purpose, it requires order ID as its argument. By default, order_id is the current order’s ID in a WooCommerce store for the [wcj_order_total_refunded] shortcode.

Args 

  • order_id – The ID of the WooCommerce order to display its total refund amount.
  • hide_currency – Hide/show the currency sign for the output when its value is `yes` or `no`, respectively.
  • hide_if_zero – Hide/show the output if zero when its value is `yes` or `no`, respectively.
  • Other attributes that can be used with this shortcode can be found here.

Possible Usage 

  • Use it in the PDF Invoicing and Packing Slips Plugin templates while you automate your invoices or custom documents in the WooCommerce store.
  • Use it in the WooCommerce PHP templates with the order_id attribute. You may use the Template Editor plugin for editing these templates.
  • Use it anywhere in your WooCommerce store with the order_id attribute.

Input and Output Example

[wcj_order_taxes_html] #

Overview

This shortcode displays all taxes applied on a particular order. Its output is in the HTML format with the relevant details. For example, if an order has a location-based tax and a tax amount for shipping, both values will be listed as shortcode output. So, it is useful when you want to display a detailed breakdown of various taxes in your WooCommerce orders invoices or pages.

Args 

  • order_id – The integer ID given to an order. Its default value is the current order’s ID.
  • hide_currency – The trigger to hide/show the currency sign for the output (Value: `yes` or `no`). 
  • hide_if_zero – The trigger to hide/show the output if zero (Value: `yes` or `no`).
  • Orders shortcodes and All Shortcodes attributes from the common Booster attributes list.

Possible Usage 

Input and Output Example

[wcj_order_total_fees_incl_tax] #

Overview 

Use this shortcode to display the total fees that were applied on a WooCommerce order, including the taxes applicable. A store owner may use any order ID or the current order ID (default value) to show relevant details to its preferred users. 

Args

Though the shortcode [wcj_order_total_fees_incl_tax] has no particular required argument/attribute, here is a list of attributes you might want to use with it: 

  • The Orders shortcodes and All Shortcodes attributes enlisted here.
  • order_id – The integer ID of the WooCommerce order you want to total fee (incl. tax) information about.
  • hide_currency – Values accepted: `yes` or `no` to hide/show the currency symbol.
  • hide_if_zero – Values accepted: `yes` or `no` to hide/show the output when it is 0.

Possible Usage 

  • You may display more details about the applied fees (with taxes on them) in your Invoice templates using this shortcode. Use it in the templates created using PDF Invoicing and Packing Slips Plugin.
  • Edit your WooCommerce PHP page templates (include the order_id attribute in your code) using the Template Editor to customize the store frontend to show more details.

Input and Output Example

[wcj_order_meta] #

Overview

This shortcode displays the order meta field’s value, whether it is core or custom. Using [wcj_order_meta], you will even be able to add the value of meta fields created using other third-party WooCommerce/WordPress plugins too. To fetch a value, you just need to pass the meta_key name as an argument.

Args

  • meta_key – (Required) – The name/key of meta. to fetch its value for the current order.
  • order_id – If you want to fetch a meta’s value by key for a particular order, specify its ID.
  • Common Booster Arguments

Possible Usage

Example

[wcj_order_meta meta_key=”_your_key” before=”My key: “]

[wcj_order_fee]  #

Overview

The [wcj_order_fee] shortcode displays the total order fee for a particular fee type. So, it is essential for you to pass the value for the attribute name with it. Besides this, you will also need to pass the order_id attribute’s value with this shortcode. However, the templates created using the Booster PDF invoicing and Packing Slips plugin does not need the order_id explicitly.

Args 

  • name – The name of the order fee type.
  • order_id – The numeric order ID.
  • hide_currency – The trigger to Hide/show the currency symbol. (`yes` | `no`)
  • hide_if_zero – The trigger to Hide/show the zero output. (`yes` | `no`)
  • All or Orders attributes from the Common Booster Attributes page.

Possible Usage 

  • In invoice templates of various types (General, proforma, credit notes, etc.)
  • In the store pages related to orders, using the Template Editor to edit WooCommerce templates. 

Example

[wcj_order_fee name=`paypal`]

[wcj_order_fees_html] #

Overview

This shortcode displays the order fees for each fee type separately. The output is HTML-formatted and shows the details in different lines (linebreaks between fee types details). You may use the [wcj_order_fees_html] shortcode to give an elaborated view of the order fees in your WooCommerce or in the invoices. 

Suggestion: This shortcode works flawlessly with the Booster PDF invoicing and Packing Slips plugin. So, you may use it in the invoice templates if you use this plugin already.

Args 

  • order_id – Its default value is the current order ID but you need to feed an order ID for the pages where the current order ID is not reaching to it already.
  • hide_currency – Its accepted values are `yes` and `no`. Hide/show the currency symbol with its help.
  • hide_if_zero – Its accepted values are `yes` and `no`. Hide/show the output with its help when it is zero (0).
  • Args from the All attributes or Orders attributes sections on the Common Attributes page.

Possible Usage 

  • You may add its HTML-formatted output to your invoice templates.
  • You may customize your WooCommerce templates using Template Editor to add this shortcode’s output on your store pages.

Example

[wcj_order_fees_html before=`Order Fees: <br/>`]

[wcj_order_total_fees] #

Overview

The [wcj_order_total_fees] shortcode sums all applied WooCommerce fees store order and displays the output prefixing the currency sign to it. However, to hide the currency sign optionally, you can use the hide_currency attribute.

You may use the order_id attribute with it when you want to display the total fees for a particular order. Otherwise, the current order’s details are shown as the shortcode output.

The shortcode [wcj_order_total_fees] can be used in the Booster PDF invoicing and Packing Slips plugin templates.

Args

  • order_id – The numeric WooCommerce ID of an order.
  • hide_currency – Hide/show the currency symbol using values `yes` or `no`.
  • hide_if_zero – Hide/show the zero output using values `yes` or `no`.
  • In the All Shortcodes or Orders Shortcodes attributes – See here.

Possible Usage

  • Total fees applied on an order total can give a detailed view of overall changes to your buyers when used in invoices, or to you when used in customer documents related to your orders.
  • The same applies to your store pages, e.g. order details page. So, insert the shortcode (while using the order_id attribute) in the WooCommerce templates using the Template Editor if you prefer. 

Example

[wcj_order_total_fees before=`Total Fees related to this order is: `]

[wcj_order_customer_note] #

Overview 

If – on your store’s checkout page – you are taking order notes (customer notes) from your buyers, this shortcode can be used to display that input for any order ID or for the current order. For the orders will no customer notes, [wcj_order_customer_note] will result in a blank/null output.

Args

There is no compulsory attribute to be used with the customer note shortcode. However, you may use the following attributes as and when needed:

Possible Usage 

Input and Output Example 

[wcj_order_billing_phone] #

Overview

The [wcj_order_billing_phone] shortcode fetches the billing phone number details related to an order and shows them as the output. It works without hassles with Booster PDF invoicing and Packing Slips plugin templates for any WooCommerce store.

Note: The shortcode can be considered an optimized version of the following shortcode: [wcj_order_checkout_field field_id=”billing_phone”]

Args

You may optionally use:

  • order_id – Order ID, for which, billing phone details are to be fetched.
  • Common Booster Shortcodes attributes – check here.

Possible Usage  

The shortcode can be added on the order details page, packing slips, invoices, or custom documents for the record, in case your team or the customer wants to view or re-verify it.

Related Plugins

Example

  • On Order Details Page

[wcj_order_billing_phone before=`You Billing Phone Number for this order is `]

  • In any Invoice/Packing Slip Template

[wcj_order_billing_phone before=`Billing Phone:`]

[wcj_order_checkout_field] #

Overview

This shortcode outputs the checkout field’s value related to the current order or for a particular order by its ID. These checkout fields are present on the checkout page (in the checkout details form) and most of the values of these fields are provided by customers. So, adding this data to your invoices will be good for the maintenance of records, customers’ reference, and internal operations. Common WooCommerce checkout fields are:

billing_address_1
billing_address_2
billing_city
billing_country
billing_email
billing_eu_vat_number
billing_first_name
billing_last_name
customer_user_agent
order_key
order_tax
order_shipping_tax
billing_state
description
first_name
last_name
nickname
shipping_address_1
shipping_address_2
shipping_city
customer_ip_address
order_shipping
order_total
order_currency
shipping_country
shipping_first_name
shipping_last_name
shipping_method
shipping_postcode
shipping_state
billing_phone
billing_postcode
customer_note
payment_method
payment_method_title

Args

  • field_id – (Required) – The name/key of the order checkout field.
  • order_id – The WooCommerce order ID.
  • Common Booster Arguments

Possible Usage

Example

[wcj_order_checkout_field field_id=”billing_email” before=”Billing email: “]

[wcj_order_time] #

Overview

Use [wcj_order_time] to show the time when a particular order was placed. The shortcode can be used with the order_id attribute when you want to display the time of a particular order.

Note: As this shortcode works as per the store’s configuration, the time will also be according to it. For more clarity, it is better to add a postfix value (after attribute) to it.

Args

  • order_id – Order ID, for which, billing phone details are to be fetched.
  • before – Prefixthe the output.
  • after – Suffix to the output.
  • time_format – Specify a time format adhering to the PHP date and time function, e.g. “h:i:sa”.
  • Check a few more common attributes to be used with this shortcode here.

Possible Usage

Example

  • On Order Details Page (for the US only)

[wcj_order_time before=`This order was made at` location=`US`]

  • In a Packing Slip (with timezone details)

[wcj_order_time before=`Order Time` after=` UTC +5.30`]

  • In an Invoice Template (for all)

[wcj_order_time before=`Order Time:`]

[wcj_order_payment_method] #

Overview

This shortcode displays the payment method, used for placing a particular order. To show an output, it needs the ID of the WooCommerce order. Through the Current Order ID is automatically passed, you may use the attribute order_id with it to fetch the payment method related to a particular order.

Note:  This shortcode is compatible with the Booster PDF invoicing and Packing Slips plugin.

Args

Possible Usage

  • Display the payment method by order in your invoice templates.
  • Save more details about your orders in customer document templates by adding the payment method details to it.
  • Add this shortcode to your WooCommerce shop pages (PHP Code) using the Template Editor.

Example

Payment Method: [wcj_order_payment_method]

[wcj_order_items_total_number] #

Overview

This shortcode – for any particular WooCommerce order in your store – can display the total items ordered. Its output is a numeric value. For the calculation, it counts every item related to each product as a separate entity. It means that if you have ordered 5 t-shirts, 6 cakes, and 2 hoodies, the shortcode will return 13 as the output.

Suggestion: Can be used in templates being created using the Booster PDF invoicing and Packing Slips plugin.

Args

  • order_id – The WooCommerce (integer) order ID.
  • The attributes from the All Shortcodes or Orders Shortcodes from this page.

Possible Usage

  • Show the total number of items ordered in the packing slips using the Booster’s plugins.
  • Add total items count related to any order on that order’s details page by modifying the related WooCommerce template using the Template Editor plugin.

Example

Total items: [wcj_order_items_total_number]

[wcj_order_shipping_method] #

Overview 

The [wcj_order_shipping_method] shortcode shows the shipping method related to a particular order. This order is either the current order or the one with the order ID same as you have specified through the order_id attribute.

Note: This shortcode is especially used in the invoice, proforma, credit note, and packing slip templates created in the Booster PDF invoicing and Packing Slips plugin settings. However, as far as you have the Booster plugin enabled and a valid order_id reaching this shortcode, it will work throughout your online store.

Args

  • order_id – The ID of the order, for which, the shipping method is to be displayed.
  • All the attributes that work for All Shortcodes or Orders ShortcodesSee this page.

Possible Usage

  • In your order-related templates, e.g. invoice templates, packing slips templates, etc.
  • In the WooCommerce page templates when you want to customize the store frontend (use the Template Editor Plugin).

Example

Shipping Method: [wcj_order_shipping_method]

[wcj_order_total_excl_tax] #

Overview

This shortcode can print the order total fees related to a WooCommerce order by its order ID while excluding the taxes applied.

Though it requires using the order_id attribute in most cases, store owners can use the shortcode with or without any additional information (arg/attribute) while using it in the invoice templates created using the Booster PDF invoicing and Packing Slips plugin.

Args

  • order_id – The WooCommerce (integer) order ID.
  • hide_currency – Hide/show the currency symbol using values `yes` or `no`.
  • hide_if_zero – Hide/show the zero output using values `yes` or `no`.
  • Any of the All or Orders attributes from this page.

Possible Usage 

  • In invoices or custom documents in your WooCommerce store.
  • In your orders/myaccount PHP templates (with the order_id attribute). You may use Template Editor to edit these or any WooCommerce templates in your store.

Example

[wcj_order_total_excl_tax before=`Total Fees applied on this order (excl. Tax): `]

[wcj_order_currency] #

Overview

Use this shortcode to specify the fiat currency, which was used to place an order. This detail can be displayed for the current WooCommerce order or a particular WooCommerce order by its order ID.

The [wcj_order_currency] shortcode is particularly useful when you generate invoices. You can use it with the Booster PDF invoicing and Packing Slips plugin as it works perfectly fine with this Booster plugin. (There will be no need to pass the order ID (order_id attribute) explicitly in this scenario.)

Args

There is no compulsory attribute for this order, but you may use common Booster attributes with it as and when you prefer.

Possible Usage

  • Show currency of purchase in the customer invoices.
  • Record currency of purchase in the customer invoices.
  • Add the shortcode in PHP templates related to WooCommerce orders.
  • Add currency on packing slips, especially for COD (Cash on Delivery) orders.

Suggestion: Use the Template Editor plugin for WooCommerce templates editing.

Example

[wcj_order_currency before=`Currency of Making the Purchase: `]

[wcj_order_shipping_price] #

Overview

This shortcode is created keeping the Booster PDF invoicing and Packing Slips plugin in mind. However, with a valid order_id, it can be used throughout any WooCommerce store that has the Booster plugin enabled.

You can use the [wcj_order_shipping_price] shortcode to display the shipping price for a WooCommerce order placed with your store. The output will be shown according to the current order ID or the order ID specified as the related attribute’s value.

Args

  • order_id – The order ID (numeric).
  • excl_tax – Set is value `yes` to exclude taxes. Default value is `no`.
  • hide_currency – Set is value `yes` to hide currency symbol. Default value is `no`.
  • hide_if_zero – Set is value `yes` to hide the zero-output. Default value is `no`.
  • Other attributes, enlisted in the All Shortcodes or Orders Shortcodes categories on this page.

Possible Usage 

  • To explicitly mention the shipping cost in your invoice templates.
  • To add shipping cost on the packing slips so that buyers could see it before opening the order packaging.
  • In various WooCommerce pages in your store (related to orders). Remember to use the attribute order_id and the plugin Template Editor (optionally) while customizing your store’s frontend.

Example

[wcj_order_shipping_price before=`Shipping Charge: `]

[wcj_order_total_tax_percent] #

Overview

Give your customers a quick idea of how much they are paying for an order using this shortcode in your WooCommerce store. The [wcj_order_total_tax_percent] shortcode outputs the tax percentage related to a WooCommerce order (the current one, or by the order ID)

The shortcode is particularly useful when you are automating the invoice template creation using the Booster PDF invoicing and Packing Slips plugin. However, you can use it throughout the online store (with an order ID specified) when the Booster plugin is activated.

Args 

  • order_id – The numeric order ID, to fetch tax percent for an order.
  • hide_if_zero – Hides or shows the output when it is zero (Use `yes` or `no`).
  • Any of the All Shortcodes or Orders Shortcodes attributes.

Possible Usage 

  • Give clear details about tax deduction (percent) in your WooCommerce order invoices.
  • Show the tax percent on any orders page in the WooCommerce store. (Consider using the Template Editor plugin to modify the WooCommerce Templates in your store)

Example

[wcj_order_total_in_words] #

Overview

This shortcode displays the total order amount in words in English at present. Though designed for the Booster PDF invoicing and Packing Slips plugin, if you have the Booster plugin installed in your store, you can use it anywhere in your store as far as it receives a valid order ID (order_id attributes). 

Args

  • order_id – Pass the integer order ID or the current order ID will be used.
  • excl_tax – (Default: `no`) Set its value to `yes` when you want to exclude taxes.
  • whole – Set a name for the whole part. It is `USD` (Dollars) by default.
  • whole – Set a name for the decimal part. It is ‘¢’ (Cents) by default.
  • Any of the All or Orders attributes from this page.

Possible Usage

As packing slips or invoices may get distorted after some time, digital might confuse people, so if your user base is habitual of using printed slips more than digital records, you must add the order total amount in words. It will keep the details safe for longer with them.

A few use cases, in this scenario, for the [wcj_order_total_in_words] shortcode are:

  • In the Invoices, packing slips, proforma, and credit notes.
  • You may add the order total in words in your WooCommerce store by modifying the theme template using the Template Editor.

Example

Total (in words): [wcj_order_total_in_words]

A possible output could be:

Total (in words): Fifty-seven USD, Fifty-seven ¢.

[wcj_order_total_tax] #

Overview

The total tax, related to a particular WooCommerce order, can be fetched using this Booster shortcode. Make sure to enable the Booster for WooCommerce plugin for your store in order to print the desired output with it.

Note: It can be used in the templates created using the Booster PDF invoicing and Packing Slips plugin directly (without the order_id attribute). The automated templates will fetch the total tax details for the current order each time.

Args

  • order_id – Specify an order ID to view the total tax related to it.
  • hide_if_zero – Enter `yes` to hide the zero output. Its default value is `no`.
  • Attributes belonging to the categories All Shortcodes or Orders Shortcodes.

Possible Usage 

To Show the total tax amount in your invoice and custom document templates with custom prefix and suffix texts. You may also add the shortcode output on the orders or order details page by editing the WooCommerce template using the Template Editor plugin.

Example

[wcj_order_total_tax before=`Total Tax: `]

[wcj_order_shipping_tax] #

Overview

Display the total shipping tax applied on a particular order using this shortcode. By default, it will display the shipping tax related to the current order. To fetch this value related to a particular order, use its order ID as the value for the order_id attribute.

Note: This shortcode is compatible with the Booster PDF invoicing and Packing Slips plugin. But for the Booster plugin users, it will work throughout their WooCommerce store (when it could receive a valid order ID).

Args

  • order_id – The WooCommerce (integer) order ID.
  • hide_currency – Hide/show (`yes` | `no`) the currency of the shipping tax.
  • hide_if_zero – Hide/show (`yes` | `no`) the output when shipping tax is zero.
  • Other common (or orders-related) attributes.

Possible Usage

  • To display the shipping tax separately in your shop when you charge tax (e.g., on international shipping) on order shipping. For this, you can either add it to your WooCommerce templates or to your orders or my account pages through the admin dashboard.
  • In your various orders related templates, e.g. invoices, packing slips, etc.

Example

Shipping Tax: [wcj_order_shipping_tax]

[wcj_order_total_discount] #

Overview

The [wcj_order_total_discount] shortcode is useful when you are giving big discounts to your buyers. Instead of just showing the total order discount in the order receipt or during checkouts (that the customer will forget soon), you can add it in the invoices and in the My account > Orders or Order details pages which can be revisited.

This shortcode will let you display the total discount you’d given on an order, by the order ID or for the current order.

Args 

  • order_id – The order ID, for which, you want to show the total discount applied.
  • excl_tax – when you want to exclude the taxes from the discount amount.
  • hide_currency – Hide (`yes’) | Show (`no`)
  • hide_if_zero – Hide (`yes’) | Show (`no`)
  • These attributes, except for the product_id attribute.

Possible Usage 

To highlight the discount you have given to your buyers and leave a good impression on them, you may use this shortcode:

Example

You Awailed a Discount of [wcj_order_total_discount]

[wcj_order_shipping_address]  #

Overview

The [wcj_order_shipping_address] shortcode lets you print the shipping/delivery address of the buyer related to the current order. Details are published for the current order ID by default, but you can publish them for any order by its order ID using the attribute order_id.

Args 

Possible Usage 

The most common utility of this shortcode is for the plugin Woocommerce PDF Invoices & Packing Slips. Invoice templates, created using the plugin, can have this shortcode and print the buyer’s shipping address easily with it. With it, you do not need to use the order_id attribute.

Besides the above, you can insert this shortcode and pass order_id to it on your various WooCommerce template pages using the Template Editor Plugin and show the shipping address on relevant pages in your store to your customers.

Example

Shipping Address for this order: [wcj_order_shipping_address]

[wcj_order_billing_address] #

Overview

It displays the order billing address, as specified by the customer, for a particular order. The order details are fetched using the order ID, which has the current ID as its default value. The billing details can be added to invoices, proforma, credit notes, custom documents, packing slips, and order details pages by your eCommerce business.

Note: Use the Booster PDF invoicing and Packing Slips plugin to edit any type of invoice template and the Template Editor Plugin to edit any WooCommerce PHP Template.

Args 

  • order_id – ID of the WooCommerce order, for which, the billing address is to be fetched.
  • before – The text or HTML content to be added prior to the shortcode output.
  • after – The text or HTML content to be added after the shortcode output.
  • Any of the attributes from Orders Shortcodes or All Shortcodes categories.

Possible Usage 

  • Print the billing address in your invoices or customer documents related to orders.
  • Display the billing address related to any order in your shop.

Example

Order Billing Address: [wcj_order_billing_address]

[wcj_order_id] #

Overview

This shortcode is used to display the WooCommerce Order ID for the current page. The [wcj_order_id] is the default order ID, assigned to an order in your store. It can be added to invoices or store’s order pages for reference/record by an online shop.

Note: If you are formatting it and do not want the raw output but the formatted one, it is called the order number in WooCommerce. Use the [wcj_order_number] shortcode to display it, instead.

Args 

If required, you may use the following attributes with this shortcode:

  • after – The suffix for the order ID.
  • before – The prefix for the order ID.
  • visibility – Show the shortcode output by user role.
  • site_visibility – Show the shortcode output by page type.
  • location – Show the shortcode output by country code (2-characters).
  • wpml_language – Show the shortcode output by WPML language.
  • not_wpml_language – Hide the shortcode output by WPML language.
  • billing_country – Show the shortcode output by billing country.
  • not_billing_country – Hide the shortcode output by billing country.
  • payment_method – Show the shortcode output by payment method.
  • not_payment_method – Hide the shortcode output by payment method.

Read here for more details on these attributes.

Possible Usage 

The shortcode is originally designed for Booster PDF invoicing and Packing Slips plugin. You may use it in invoices being created using it. However, it can also be used in the WooCommerce PHP templates/files. 

Example

Printing Order IDs in different ways for 2 locations:

[wcj_order_id location=`IN` before=`Order Reference ID: IN`]

[wcj_order_id location=`US` before=`Order Reference ID: US`]

[wcj_order_number]  #

Overview

The [wcj_order_number] shortcode displays the WooCommerce order number, specified for the current order or by order ID for a particular order in the store. This shortcode is very useful when you create invoices or customer documents using the Booster PDF invoicing and Packing Slips plugin.

Note: The output shows the formatted number and not the raw WooCommerce ID for an order. To fetch the current order’s ID, use the [wcj_order_number] shortcode instead.

Args 

Optionally, these attributes can be used with the shortcode [wcj_order_number]:

  • order_id – To show the number by order ID.
  • after – To add a postfix to the output.
  • before – To add a prefix to the output.
  • visibility – To show the output to several user roles only.
  • site_visibility – To show the output for several page types only.
  • location – To show the output for several locations only.
  • wpml_language – To show the output for several WPML languages only.
  • not_wpml_language – To hide the output for several WPML languages.
  • billing_country – To show the output for several billing countries only.
  • not_billing_country – o hide the output for several billing countries.
  • payment_method – To show the output for several payment methods only.
  • not_payment_method – To hide the output for several payment methods.

Read more about common Booster attributes here.

Possible Usage 

  • In your store’s invoices and custom documents.
  • To help your customer use the order number for raising complaints or return requests.
  • For refunds and as a reference for credit notes.
  • Insert this shortcode in WooCommerce templates using the Template Editor Plugin and display its output on your store’s order-related pages.

Example

Order Number: [wcj_order_number]

[wcj_order_date] #

Overview

Show the date when a particular order was placed in your store. The [wcj_order_date] shortcode will let you do that. You can add the order date to your invoices or append it to your account’s order details page for future reference so that buyers could see it at any time.

Args

  • order_id – The order ID to fetch order date details for.
  • days – Use a positive or negative number. IT will be added or subtracted from the order date to form a different output.
  • date_format – Specify a date format. It must be a valid input for the PHP date and time function.
  • To control the visibility of the shortcode output or to add prefix/suffix to it, use attributes from this page.

Possible Usage 

  • This shortcode works inherently good for Booster PDF invoicing and Packing Slips plugin and requires no order_id argument when used in the templates configured using it.
  • One can add this shortcode in various WooCommerce template pages to change the page format in the online store for buyers, displaying the current order date or its modified value (using the days attribute).

Example

Expected Order Delivery Date: [wcj_order_date days=“3”]

[wcj_order_subtotal] #

Overview

The order subtotal amount for a WooCommerce order means the total product cost without any taxes, fees, or discounts taken into consideration. Use the shortcode [wcj_order_subtotal] to display this value in your online store – either for the current order or for any existing order through its ID.

Note: You can use this shortcode in invoice templates designed using the Booster PDF invoicing and Packing Slips plugin.

Args 

  • order_id – Enter the order ID to see the subtotal related to it.
  • hide_currency – Enter its value as `yes` to hide the currency symbol. The default value is `no`.
  • hide_if_zero – Enter its value as `yes` to hide the output if zero. The default value is `no`.
  • Common Booster attributes.

Possible Usage 

  • In invoices, custom documents, credit notes, proforma invoices, and packing slips.
  • In WooCommerce templates using the Template Editor Plugin.

Example

The Cost of Purchase excluding taxes, fees, and discount is [wcj_order_subtotal]

[wcj_order_total] #

Overview

The [wcj_order_total] shortcode outputs the total amount that the buyer has/had to pay for completing the purchase. As expected, this amount includes taxes, fees, and discounts. You can use the order_id attribute to see or display the order total for any order that exists in your shop. By default, this shortcode will print the total related to the current order.

Args

  • order_id – The ID of the order to fetch its associated order total.
  • excl_tax – Set its value to `yes` if you want to exclude the tax amount from the order total.
  • hide_currency – Set its value to `yes` if you want to hide the currency symbol from the shortcode output.
  • hide_if_zero – Set its value to `yes` if you want to hide the output when the order total is zero (for example, when a 100% refund was given).
  • Common Booster attributes

Possible Usage 

Example

Order Total: [wcj_order_total_discount]

[wcj_order_items_table] #

Overview

This shortcode, with the help of various essential and optional attributes, displays the order items details in a tabular format. There are dozens of types of columns, related to the order items, that you can add to this table (see details in the Args section).

Possible Usage 

  • To add the items’ details in tabular format to invoices, custom documents, packing slips, etc. while using this Booster Plugin.
  • To print custom details related to order items in the table format on the Orde details page. You may use the Template Editor Plugin to edit the relevant WooCommerce template for this purpose.
  • Developers, if PDF invoicing & Packing Slips Plugin is in use in the store, can use the `wcj_pdf_invoicing_cell_data` filter to format/filter the table details (See Developers section)

Args 

  • order_id – The order ID, for which, you want to show the total discount applied.
  • refunded_items_table – To display order refunded items instead of order items, set its value to `yes`.
  • These attributes, except for the product_id attribute.
  • columns – (Required) – Use the multiple identifiers from the given list, separating them by `|` (Vertical Bar).
product_sku
item_key
item_meta
item_name
item_number
item_product_addons
item_product_id
item_total_refunded
item_total_tax_excl
item_total_tax_incl
item_variation
product_width
product_barcode
line_cost
line_profit
line_subtax
item_debug
line_subtotal_tax_excl
line_subtotal_tax_incl
line_taxline_total_tax_excl
line_total_tax_incl
item_quantity
item_subtotal_tax_excl
item_subtotal_tax_incl
item_tax
item_tax_class
item_tax_percent
item_product_input_fields
item_product_input_fields_with_titles
item_quantity_excl_refunded
item_quantity_refunded
product_regular_price_multiply_qty
product_regular_price
product_sale_price_multiply_qty
product_sale_price
product_short_description
product_weight_multiply_qty
product_profit
product_weight
product_thumbnail
product_attribute
product_categories
product_cost
product_excerpt
product_height
product_id
product_length
product_meta
product_post_meta
product_purchase_note
  • columns_titles – Add column titles in a sequence, separating them by `|` (Vertical Bar).
  • columns_styles – Add column styles in a sequence, separating them by `|` (Vertical Bar).
  • hide_currency – Set its value to `yes` to hide the currency symbol from the table.
  • table_class – Apply a HTML class for the output items table, if required.
  • shipping_as_item – If you want to show the shipping as order items (if not empty), use this attribute. Item’s name can be set to `%shipping_method_name%`.
  • discount_as_item – If you want to show the discount as order items (if not empty), use this attribute. 
  • tax_percent_format – If you are displaying tax percentage data in table, formatting can be done using this attribute (Default Value: `%.2f %%`).
  • product_image_width – Set width for the product image, if your table has the `product_thumbnail` column.
  • product_image_height – Set height for the product image, if your table has the `product_thumbnail` column. 
  • price_prefix – Add a prefix to the all prices in the created table.
  • quantity_prefix – Add a prefix to the quantity details in the `item_quantity` column of the created table.
  • style_item_name_variation – When you are showing variation details in `item_name` column, use this attribute to modify the output’s style. Attribute’s default value is `font-size:smaller;`.
  • variation_as_metadata – Use this attribute to display variation details (for variable products as metadata in the `item_name` and `item_variation` columns.
  • order_user_roles – Specify a user role or a comma-separated list of user roles to make the table visible to a limited set of users (by role).
  • exclude_by_categories – Specify category names to exclude the related products from the items table by product category. To add multiple categories, use a comma-separated list.
  • exclude_by_tags – Specify tag names to exclude the related products from the items table by product tag. To add multiple tags, use a comma-separated list.
  • add_variation_info_to_item_name – Set its value to `yes` to show the variation’s details in the `item_name` column for your variable products.
  • insert_page_break – Specify the product count to add page breaks after. To show different number of products per page, specify the product count per page in a sequence, separating the details per page by vertical bars ( `|` ), e.g. `10|20|40`.
  • multiply_cost – Add a numeric value to multiple to the product/line cost if required. The multiplier’s default value is `1` and it is mostly used in `product_cost` and `line_cost` columns.
  • multiply_profit – Add a numeric value to multiple to the product/line profit if required. The multiplier’s default value is `1` and it is mostly used in `product_profit` and `line_profit` columns.
  • hide_zero_prices – Set its value to `yes` to hide all zero prices in the table. The default value is `no`.
  • product_barcode_width – Set width for the barcode, if your table has this column. Its default value is `60`.
  • product_barcode_height – Set height for the barcode, if your table has this column. Its default value is `60`.

Example

Developers

To modify final cell content for the order items table for this plugin’s templates, you may use the `wcj_pdf_invoicing_cell_data` filter. Its params are:

  • $cell_data – Filtered value.
  • $args – The arguments array has:
  • column
  • column_param
  • item
  • item_id
  • item_counter
  • product
  • Order

See how to use it, through the 3 scenarios given below:

In the case you want to format `item-number` details/columns in the table:

if ( ! function_exists( ‘alg_format_item_number_in_pdf_invoice’ ) ) {<br />

/*<br />

* alg_format_item_number_in_pdf_invoice.<br />

*/<br />

function alg_format_item_number_in_pdf_invoice( $cell_data, $args ) {<br />

if ( ‘item_number’ === $args[‘column’] ) {<br />

$cell_data = sprintf( “%02d”, $cell_data );<br />

}<br />

return $cell_data;<br />

}<br />

add_filter( ‘wcj_pdf_invoicing_cell_data’, ‘alg_format_item_number_in_pdf_invoice’, PHP_INT_MAX, 2 );<br />

}

In the case you want to remove everything after the last space in an item name:

if ( ! function_exists( ‘alg_remove_all_after_last_space_in_pdf_invoice_item_name’ ) ) {<br />

    /*<br />

     * alg_remove_all_after_last_space_in_pdf_invoice_item_name.<br />

     */<br />

    function alg_remove_all_after_last_space_in_pdf_invoice_item_name( $cell_data, $args ) {<br />

        if ( ‘item_name’ === $args[‘column’] ) {<br />

            if ( false !== ( $last_space_pos = strrpos( $cell_data, ‘ ‘ ) ) ) {<br />

                $cell_data = substr( $cell_data, 0, $last_space_pos );<br />

            }<br />

        }<br />

        return $cell_data;<br />

    }<br />

    add_filter( ‘wcj_pdf_invoicing_cell_data’, ‘alg_remove_all_after_last_space_in_pdf_invoice_item_name’, PHP_INT_MAX, 2 );<br />

}

In the case when item total zero, e.g. for bundled products:

if ( ! function_exists( ‘alg_modify_bundle_products_in_pdf_invoice’ ) ) {

/*

* alg_modify_bundle_products_in_pdf_invoice.

*/

function alg_modify_bundle_products_in_pdf_invoice( $cell_data, $args ) {

$item_total_tax_incl = $args[‘order’]->get_item_total( $args[‘item’], true, true );

if ( 0 == $item_total_tax_incl ) {

$cell_data = ‘‘ . $cell_data . ‘‘;

switch ( $args[‘column’] ) {

case ‘item_number’:

return ”;

case ‘item_name’:

return ‘-‘ . $cell_data;

}

}

return $cell_data;

}

add_filter( ‘wcj_pdf_invoicing_cell_data’, ‘alg_modify_bundle_products_in_pdf_invoice’, PHP_INT_MAX, 2 );

}

[wcj_order_items_total_quantity] #

Overview

The [wcj_order_items_total_quantity] shortcode is useful when you want to display the total items ordered by the customer (related to a particular order) in your store. This value can be fetched or printed for any existing WooCommerce order.

Args 

  • order_id – Fetch total items’ count by order ID
  • hide_if_zero – Hide the quantity if it is zero by setting this attribute’s value as `yes’.

Besides the above, you may use these attributes with this Booster shortcode. However, no attribute is essential here.

Possible Usage 

  • If you want to add the total count of items ordered, in customer invoices or the custom documents for your staff, use the shortcode with Booster PDF invoicing and Packing Slips plugin templates.
  • Developers or store owners can use the Template Editor Plugin to add this shortcode in any orders-related WooCommerce template in your shop. It will help you display items’ total quantity in your preferred way anywhere in the store.

Example

Total Items ordered: [wcj_order_items_total_quantity]

[wcj_order_items_total_weight] #

Overview

The [wcj_order_items_total_weight] shortcode displays the sum of the weight of all items that were added to an order. To fetch this detail, you can either pass any order ID as an argument with this shortcode or see the output for the current order ID itself.

Args 

You may use any of these attributes with the order items’ total weight  shortcode:

  • after – To add a suffix to the output, e.g. unit of weight.
  • order_id – The order ID to fetch the items’ total weight associated with an order.
  • hide_if_zero – Hide (`yes’) or show (`no`) the order weight if it is zero.
  • Other common attributes that belong to the categories All Shortcodes and Orders Shortcodes.

Possible Usage 

It is used the most in Booster PDF invoicing and Packing Slips plugin templates for invoicing and custom document creation. 

Example

[wcj_order_items_total_weight before=”Total weight: ” after=” kg” hide_if_zero=”yes”]

Powered by BetterDocs