Skip to content
Developers

Template overrides

WPReturns builds every customer screen from PHP templates you can override in your theme. Copy a file from the plugin’s templates/front/ folder to yourtheme/wpreturns/front/ and edit the copy. WooCommerce’s template loader then picks your copy, and plugin updates leave it alone.

Available in: Free and Pro. The extended warranty template exists only in Pro.

  1. Find the template in the plugin that runs your store. With Pro active that is wp-content/plugins/wpreturns-pro/templates/front/. With only the free plugin it is wp-content/plugins/wpreturns/templates/front/.
  2. Create the folder wpreturns/front/ inside your child theme.
  3. Copy the file there with the same name.
  4. Edit the copy.
wp-content/themes/your-child-theme/
└── wpreturns/
└── front/
└── request-view.php

Use a child theme. A parent theme update would delete your copies.

TemplateScreenMain variables
account-requests.phpMy Account > Returns: tiles, Your requests and Start a return$requests, $orders
order-panel.phpThe Returns, exchanges & warranty panel under an order$order, $requests, $links, $guest
portal-lookup.phpGuest portal: order number and billing email form$account_url
portal-order.phpGuest portal: order summary card$order, $order_data, $items
request-form.phpThe request form with items, resolution, note and uploads$order, $order_data, $type, $items, $reasons, $conditions, $resolutions, $exchange, $configuration, $posted, $note, $back_url, $token_fields, $bonus, $fees
request-view.phpThe customer’s request page$request, $order, $items, $messages, $access_key, $label_url, $configuration, $back_url
withdrawal-form.phpWithdrawal start screen, model form and statement$step, $prefill, $items, $orders, $configuration
withdrawal-done.phpWithdrawal received screen$request, $items
product-policy.phpPolicy, final-sale and warranty lines on product pages$lines, $policy_url
extended-warranty.phpExtended warranty dropdown on product pages (Pro)$options

Each template documents its variables in the header comment.

Forms post back to the same page and WPReturns reads fixed field names. When you change a form, keep:

  • the name of every input, select and textarea
  • the hidden ddwcwr_action field and the wp_nonce_field() call
  • the hidden token fields in request-form.php ($token_fields). Guests lose access without them.
  • the honeypot field (ddwcwr_website) in portal-lookup.php and withdrawal-form.php.
FileHow to change it
Email template (templates/emails/request.php and emails/plain/request.php)Edit the text in WooCommerce > Settings > Emails. To change the markup, copy it to yourtheme/woocommerce/emails/request.php, the usual WooCommerce email path.
Packing slip (templates/common/return-slip.php, Pro)Loaded directly from the plugin. It cannot be overridden from the theme.
Admin screensUse hooks such as ddwcwr_requests_list_columns

Template files carry a @version line in the header. When an update changes a template, compare it with your copy and bring over the changes. A stale copy can miss new fields or fixes.

For color and corner changes you rarely need an override. Use the CSS variables on .ddwcwr-ui. See Shortcodes and blocks.