Table of Contents
This requires the Premium Templates extension of the PDF Invoices and Packing Slips Plus Bundle.
There are 2 main types of PDF Customizer placeholders:
- The Item Column placeholders: Used in the ‘Item Columns’ region of the Customizer.
- The Custom Block placeholders. Used with the Custom Blocks and the Total Rows regions of the Customizer.
Item Column placeholders #
- {{product_description}} — the product description
- {{product_description_short}} — the product short description
- {{product_description_long}} — the product long description
- {{product_description_variation}} — the product variation description
- {{product_categories}} — the product categories
- {{product_tags}} — the product tags
- {{purchase_note}} — the product purchase note
- {{product_dimensions}} — the product dimensions
- {{sale_price_discount_excl_tax}} — the product sale price discount excluding taxes
- {{sale_price_discount_incl_tax}} — the product sale price discount including taxes
- {{sale_price_discount_percent}} — the product sale discount percent
- {{wc_brands}} — the product brands
- {{sku}} — the product SKU
- {{product_id}} — the product ID
- {{item_id}} — the item ID
- {{variation_id}} — the variation ID
- {{product_custom_field::META_KEY}} — a product custom field (replace META_KEY with the name of the custom field)
- {{item_meta::META_KEY}} — a product item meta (replace META_KEY with the name of the item meta)
- {{product_attribute::ATTRIBUTE_NAME}} — a product attribute (replace ATTRIBUTE_NAME with the name of attribute)
- {{wpo_batch_number}} — the product batch number (from WooCommerce Product Batch Numbers)
- {{wpo_batch_expiry_date}} — the product batch expiry date (from WooCommerce Product Batch Numbers)
- {{product_barcode}} — the product barcode (from WooCommerce Ultimate Barcodes)
Custom Block placeholders #
If you add a custom block with the type set to text you can use the following placeholders (including accolades):
- {{invoice_number}} – the invoice number
- {{invoice_date}} – the invoice date
- {{document_number}} the document number
- {{document_date}} – the document date
- {{order_status}} – the order status
- {{status}} – the order status slug
- {{version}} – the WooCommerce version
- {{currency}} – the order currency
- {{site_title}} – the site title
- {{wpo_wcpdf_shop_name}} – the shop name set under WooCommerce > PDF Invoices
- {{shipping_notes}} – the shipping / customer notes (entered by the customer in the checkout)
- {{order_notes}} – the order notes
- {{invoice_notes}} – the invoice notes
- {{private_order_notes}} – the private order notes
- {{order_number}} – the order number
- {{date_created}} – the date the order was created
- {{date_modified}} – the date the order was modified
- {{order_date}} – the order date
- {{order_time}} – the order time
- {{transaction_id}} – the transaction ID
- {{order_weight}} – the total weight of all items in the order
- {{order_qty}} – the total quantity of items in the order
- {{date_completed}} – the date when the order was completed
- {{current_date}} – the current date (when the PDF is printed/downloaded from the site)
- {{used_coupons}} – the coupons used in this order
- {{current_user_name}} – the username of the current user
- {{customer_id}} – the customer ID
- {{customer_ip_address}} – the customer IP address
- {{customer_order_count}} – the customer order count
- {{customer_total_spent}} – the customer total spent
- {{customer_registered_date}} – the customer registered date
- {{customer_user_agent}} – the customer user agent
- {{formatted_order_total}} – the order total
- {{formatted_subtotal}} – the subtotal
- {{formatted_discount}} – the given discount
- {{formatted_shipping}} – the shipping costs
- {{formatted_order_total_ex}} – the total without taxes
- {{formatted_subtotal_ex}} – the subtotal without taxes
- {{formatted_discount_ex}} – the given discount without taxes
- {{formatted_shipping_ex}} – the shipping costs without taxes
- {{spelled_out_total}} – the spelled out total
- {{shipping_method}} – the shipping method name
- {{payment_method_title}} – the payment method name
- {{payment_method_description}} – the payment method description
- {{payment_method_instructions}} – the payment method instructions (when applicable)
- {{payment_method_thankyou_page_text}} – the payment method “Thank you” page text
- {{payment_status}} – the order payment status (“Paid” or “Unpaid”)
- {{payment_url}} – the checkout payment URL
- {{date_paid}} – the date of payment
- {{time_paid}} – the time the order was paid
- {{wpo_wcpdf_shop_address}} – the shop address set under WooCommerce > PDF Invoices > General
- {{wpo_wcpdf_footer}} – the footer set under WooCommerce > PDF Invoices > General
- {{wpo_wcpdf_extra_1}} – the extra field 1 set under WooCommerce > PDF Invoices > General
- {{wpo_wcpdf_extra_2}} – the extra field 2 set under WooCommerce > PDF Invoices > General
- {{wpo_wcpdf_extra_3}} – the extra field 3 set under WooCommerce > PDF Invoices > General
- {{ABSPATH}} – the absolute path to the WordPress directory
- {{WP_CONTENT_DIR}} – the WordPress content directory path
- {{document_barcode}} – shows the document barcode from WooCommerce Ultimate Barcodes
- {{order_barcode}} – shows the order barcode from WooCommerce Ultimate Barcodes
- {{wc_order_barcode}} – Shows the barcode from WooCommerce Order Barcodes
- {{local_pickup_plus_pickup_details}} – Shows information from WooCommerce Local Pickup Plus
- {{myparcel_track_trace}} – Shows the order track & trace from WooCommerce MyParcel
- {{myparcel_track_trace_link}} – Shows the order track & trace link from WooCommerce MyParcel
- {{myparcel_delivery_options}} – Shows the order delivery options from WooCommerce MyParcel
- {{due_date}} – Shows the due date.
- {{due_date|+n days}} – Shows the due date with a numbers of days added to this date. Example: {{due_date|+30 days}}
- {{wpo_shop_vat_number}} Shows the Shop VAT number set at WooCommerce > PDF Invoices > General.
- {{wpo_shop_coc_number}} Shows the Shop COC number set at WooCommerce > PDF Invoices > General.
- {{refund_number}} Shows the WooCommerce refund number.
Billing address
- {{billing_address}} – the full billing address, formatted by WooCommerce
- {{billing_first_name}} – the first name of the billing address
- {{billing_last_name}} – the last name of the billing address
- {{billing_company}} – the company name of the billing address
- {{billing_address_1}} – the first address line of the billing address
- {{billing_address_2}} – the second address line of the billing address
- {{billing_city}} – the city name of the billing address
- {{billing_postcode}} – the ZIP code of the billing address
- {{billing_country}} – name of the country of the billing address
- {{billing_state}} – the name of the state of the billing address
- {{billing_email}} – the email address of the billing address
- {{billing_phone}} – the phone number of the billing address
Shipping address
- {{shipping_address}} – the full shipping address, formatted by WooCommerce
- {{shipping_first_name}} – the first name of the shipping address
- {{shipping_last_name}} – the last name of the shipping address
- {{shipping_company}} – the company name of the shipping address
- {{shipping_address_1}} – the first address line of the shipping address
- {{shipping_address_2}} – the second address line of the shipping address
- {{shipping_city}} – the name of the city of the shipping address
- {{shipping_postcode}} – the ZIP code of the shipping address
- {{shipping_country}} – the name of the country of the shipping address
- {{shipping_state}} – the name of the state of the shipping address
Example usage #
Item Column placeholder #
This example will use the Product Custom Field placeholder:
{{product_custom_field::META_KEY}}
- Replace META_KEY with the name of the custom field.
Example custom field name: total_sales
Full placeholder: {{product_custom_field::total_sales}}
Total Row placeholder #
- Add a new block of type Text as that is the only block that supports placeholders for now.
Custom Block placeholder #
- Add a custom block and set the type to Text.