fbpx

Description

[wcj_order_refunds_table] shortcode displays WooCommerce order refunds table. If there are no refunds in order, nothing will be outputted.

Alternatively, to display refunded items table, you can use [wcj_order_items_table] shortcode with `refunded_items_table` attribute set to `yes`.

Args

columns
(required) List of predefined table columns you need to display. Columns identifiers must be separated by vertical bars ( | ). Possible column identifiers are:
  • refund_number
  • refund_title
  • refund_reason
  • refund_reason_or_title
  • refund_amount
  • refund_items

Default: None

columns_titles
(optional) List of column titles. Titles must be separated by vertical bars ( | ).
Default: None

columns_styles
(optional) List of column styles. Styles must be separated by vertical bars ( | ).
Default: None

table_class
(optional) HTML class for the resulting table.
Default: None

insert_page_break
(optional) Sets maximum number of items on single page. Can be multiple numbers separated by vertical bars ( | ).
Default: None

price_prefix
(optional) Can be used to add minus sign before refund amount (refund_amount column only).
Default: None

insert_page_break
(optional) Sets number of items after which page break should inserted. Can be list of numbers separated by vertical bars ( | ). E.g. `10|20`.
Default: None

Examples

[wcj_order_refunds_table<br />
    table_class="pdf_invoice_items_table"<br />
    insert_page_break="10|20"<br />
    columns="refund_number|refund_title|refund_reason|refund_items|refund_amount"<br />
    columns_titles="#|Title|Reason|Items|Amount"<br />
    columns_styles="width:5%;|width:30%;|width:30%;|width:20%;|width:15%;text-align:right;"]

Accessible through:
  • [wcj_order_refunds_table]
Tested on WooCommerce 8.5.1 and WordPress 6.4.2