Returnline documentation1.x
Developers

Templates

Override the customer's pages and the emails in your theme, and the classes you can style.

Returnline's customer pages and emails are WooCommerce templates, so you can override them like WooCommerce's own.

Overriding a template

Copy the file from the plugin's templates/ folder into a returnline/ folder in your (child) theme, keeping the path below templates/, and edit the copy:

Template Copy to
templates/myaccount/returns.php: My account → Returns yourtheme/returnline/myaccount/returns.php
templates/myaccount/return-request.php: the request form yourtheme/returnline/myaccount/return-request.php
templates/myaccount/return-view.php: a return's page yourtheme/returnline/myaccount/return-view.php
templates/myaccount/order-returns.php: the Returns section on an order yourtheme/returnline/myaccount/order-returns.php
templates/emails/returnline-return.php: the emails (HTML) yourtheme/returnline/emails/returnline-return.php
templates/emails/plain/returnline-return.php: plain text yourtheme/returnline/emails/plain/returnline-return.php

Each template lists the variables it gets at the top. Keep the form field names and the hooks (do_action( 'returnline_…' )) in your copy, or add-ons such as Returnline Pro can't add their parts.

Tip

After a Returnline update, compare your copies with the new templates, as you would for WooCommerce's.

Styling without overriding

Most changes only need CSS. The pages use WooCommerce's classes (woocommerce-orders-table, order_details, woocommerce-OrderUpdates), so your theme already styles them. Returnline's own classes:

Class Element
.returnline-request The request form; data-resolution holds the chosen resolution
.returnline-item, .is-selected An item card on the form, and a ticked one
.returnline-choice A resolution choice, when there is more than one
.returnline-progress, li.is-done, li.is-current The progress bar
.returnline-instructions The "How to send it back" box
.returnline-timeline Return updates

For example, a progress bar in your brand colour:

.returnline-progress li.is-done::before,
.returnline-progress li.is-done::after { background: #0a7d55; border-color: #0a7d55; }

The emails' styles come from WooCommerce's email stylesheet, in your email base colour; filter woocommerce_email_styles to change them.