Shortcodes and blocks
WPReturns has two shortcodes and two matching blocks: [ddwcwr_returns_portal] with the Returns portal block, and [ddwcwr_withdrawal_form] with the Withdrawal form block. The first pair shows the guest returns portal and the second shows the EU withdrawal function. Neither takes attributes, and both render on the server.
Available in: Free and Pro.
Shortcode and block names
Section titled “Shortcode and block names”| What it shows | Shortcode | Block name | Block title |
|---|---|---|---|
| Guest returns portal | [ddwcwr_returns_portal] | ddwcwr/returns-portal | Returns portal |
| EU withdrawal function | [ddwcwr_withdrawal_form] | ddwcwr/withdrawal-form | Withdrawal form |
Both blocks sit in the WooCommerce category of the block inserter.
The My Account Returns page is a WooCommerce account endpoint. It needs no shortcode. See Returns in My Account.
Add a block to a page
Section titled “Add a block to a page”- Open the page in the block editor.
- Select the + inserter and search for “Returns portal” or “Withdrawal form”.
- Insert the block and publish the page.
- Go to DevDiggers Plugins > WPReturns > Configuration and point the matching setting at this page.
| Block or shortcode | Setting to update |
|---|---|
| Returns portal | Guest returns portal page on the General tab |
| Withdrawal form | Withdrawal page on the EU Withdrawal tab |
Emails, the footer link, checkout notices and order buttons all link to the page saved there.
Use the shortcode in a classic page or builder
Section titled “Use the shortcode in a classic page or builder”Paste the shortcode into a Shortcode block, a classic editor page or a page builder text widget:
[ddwcwr_returns_portal][ddwcwr_withdrawal_form]Place each one only once per page. Each shortcode reads its own query parameters, such as ddwcwr-order and ddwcwr-key. Two copies on one page would show the same screen twice.
Pages created on activation
Section titled “Pages created on activation”| Page | Slug | Content |
|---|---|---|
| Returns (Returns & Exchanges when Pro creates it) | returns | [ddwcwr_returns_portal] |
| Withdraw from contract | withdrawal | [ddwcwr_withdrawal_form] |
If a page with the shortcode already exists, activation reuses it.
Styling
Section titled “Styling”Plugin styles and scripts load only on My Account, on pages with a shortcode or block and on the two pages saved in settings.
Every customer screen sits inside a .ddwcwr-ui wrapper and inherits your theme’s fonts. Colors and corners come from CSS variables you can override in your theme:
.ddwcwr-ui { --ddwcwr-accent: #0256ff; --ddwcwr-accent-text: #ffffff; --ddwcwr-card: #ffffff; --ddwcwr-radius: 12px; --ddwcwr-radius-sm: 8px;}In Pro, the Appearance tab sets the accent color, button text color, card color and corner style without code. See Appearance.
To change the markup itself, copy a template into your theme. See Template overrides.