[wcj_order_refunds_table]

Display WooCommerce order refunds

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
    table_class="pdf_invoice_items_table"
    insert_page_break="10|20"
    columns="refund_number|refund_title|refund_reason|refund_items|refund_amount"
    columns_titles="#|Title|Reason|Items|Amount"
    columns_styles="width:5%;|width:30%;|width:30%;|width:20%;|width:15%;text-align:right;"]
Accessible through:
  • [wcj_order_refunds_table]
Tested on WooCommerce 3.7.0 and WordPress 5.2.3
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

5 Comments

  1. Eric Onder de Linden April 27, 2019 at 12:47 am #

    Hello there,

    I need your help again. This is actually my template I am using for PDF credit notes:

    [wcj_order_refunds_table
    table_class="pdf_invoice_items_table" price_prefix="-"
    insert_page_break="10|20"
    columns="refund_number|refund_items|refund_reason|refund_amount"
    columns_titles="#|Produkte|Korrekturgrund|Gesamtpreis"
    columns_styles="width:3%;|width:40%;|width:42%;|width:15%;text-align:right;"]

    Zwischensumme (ohne MwSt.)-[wcj_order_total_refunded excl_tax="yes"]
    MwSt. 7%-[wcj_order_total_tax_after_refund tax_class="ermaessigter-steuersatz" hide_if_zero="no"]
    Gesamtbetrag (inkl. MwSt.)-[wcj_order_total_refunded excl_tax="no"]

    My problem is that I need…
    1) the refunded item amount without tax (single item and line subtotal)
    2) the refunded total of the order without tax (not working in the code above with “excl_tax=”yes”)
    3) the total tax that has been refunded, and not the order total tax minus the refunded tax

    thanks!

    Reply to thread

    Avatar
    • RokasJ May 2, 2019 at 8:35 pm #

      Hi,

      Unfortunately it’s not currently possible to specify whether to show refunded prices with or without tax (excl_tax argument does not exist yet) but we have added it to our to-do list.

      Best regards,
      Rokas – Support Team

      Avatar
  2. Nancy June 19, 2019 at 8:48 am #

    Hi,

    how i can put in the refund template the product sku (it’s usseful for us and the customer) thanks 🙂

    Reply to thread

    Avatar
    • RokasJ June 19, 2019 at 5:55 pm #

      Hi Nancy,

      Unfortunately that is not possible yet but we have added it to our todo list.

      Best regards,
      Rokas – Support Team

      Avatar
    • Nancy June 20, 2019 at 6:02 am #

      Wops 🙁 with the title of the product is sometimes difficult to locate the product internally, it is more useful with the sku … I hope have it in mind and if your team do the update I would love to receive the notice 🙂

      Avatar