メインコンテンツまでスキップ

Integrations

ReturnDesk works on its own. It detects the plugins on this page at runtime, and nothing here is required.

WooCommerce features​

  • High-Performance Order Storage (HPOS). Compatibility is declared. ReturnDesk only uses the WooCommerce order API, and its own tables refer to order ids.
  • Checkout block. Store credit (Pro) has its own component in the Checkout block, next to the classic checkout checkbox.
  • WooCommerce Fulfillments. When the feature is switched on, a delivery date recorded on a shipment can start the return window (Count the window from > Delivery date), and a return label becomes a shipment of the returned items on the original order, tagged with the return id. Without Fulfillments, the tracking goes into an order note.
  • Action Scheduler. Label jobs, reminders, automatic closing and credit expiry (Pro) run as Action Scheduler jobs, which ship with WooCommerce.
  • WooCommerce webhooks (Pro). Three return topics are available, see REST API.

WooCommerce Subscriptions​

ReturnDesk has basic support for renewal orders, not yet certified with WooCommerce Subscriptions: it has not been tested against the real plugin for this release. ReturnDesk does not need WooCommerce Subscriptions. When it is active:

  • Renewal orders are ordinary orders. When they are Completed or Processing they can be returned like any other order.
  • The subscription itself is not an order with a status, so it can never be returned.
  • The sign-up fee is paid once, on the first order, on top of the recurring price. ReturnDesk takes the fee of one unit off the value of one unit of the order line, so the sign-up fee is never offered as a refund. The return screen, the plan and the refund all follow.
  • Store credit (Pro) is never applied to renewals, recurring carts or subscription orders.

The sign-up fee rule uses the tsre_unit_refund filter, which you can use for other add-on fees too.

PDF invoices and credit notes​

ReturnDesk has no dependency on any invoicing plugin. Instead, when a return creates a WooCommerce refund, it fires the tsre_credit_note_requested action once for that refund, after the refund is saved:

add_action( 'tsre_credit_note_requested', function ( $order, $refund ) {
my_invoice_plugin_credit_note( $order->get_id(), $refund->get_id() );
}, 10, 2 );
  • $order is the order that was refunded and $refund is the refund the return created. Its amount, line items and tax lines are final.
  • Delivery is at least once. If a request dies right after the action, a later retry can fire it again for the same refund, so check whether you already issued a credit note for $refund->get_id().
  • The action does not fire when a return refunds nothing, or for a store credit or an exchange without a refund.
  • A "Credit note requested" entry on the return's timeline records that it fired.

If your invoicing plugin offers no function to call, ask its author for the hook to create a credit note from a WooCommerce refund id and call it from the callback above.

WPML and Polylang​

The settings contain a few texts that you type in your own language: the reason labels and the instructions for customer-supplied labels. With WPML String Translation or Polylang active, customers see them in their own language:

  • The texts are stored once, in your language, and registered with the plugin in the string group returndesk whenever you save the settings. Open WPML String Translation or Polylang's string translations to translate them.
  • On the storefront each text goes through the translation function of the plugin. In the admin the stored text is always shown, so a translation is never saved over your original.
  • Email subjects, headings and the extra text of the return emails are registered as WPML admin texts through the wpml-config.xml file that ships with the plugin, so you can translate them too.
  • Everything else (the wizard, the policy block, the portal and the status names) is built from the plugin's own translated strings and your numbers, so it needs no registration.

Without WPML or Polylang the settings are used as they are.

Translating the plugin​

The text domain is returndesk and the template is languages/returndesk.pot. It includes the strings of the block editor scripts and the block.json files. Translate it with a tool such as Loco Translate or Poedit and save the .po and .mo files in wp-content/languages/plugins/, named like returndesk-fr_FR.mo.

Caching plugins​

Guest portal pages that carry a token (Pro) send no-cache headers and Referrer-Policy: no-referrer, and tell page caches not to store them (DONOTCACHEPAGE). My Account pages are private to the signed-in customer, as with WooCommerce itself. If you cache My Account or the portal page by URL, exclude /my-account/returns/ and /returns-portal/.