Endpoints are essentially an extra part in the website URL that we detect and show different content when present.
For example, you may have a ‘my account’ page shown on the URL yoursite.com/my-account. When the endpoint ‘edit-account’ is appended to this URL, making it ‘yoursite.com/my-account/edit-account‘ we show the Edit account page instead of the My account page.
This allows us to show different content without the need for multiple pages and shortcodes, thus reducing the amount of content we need to install.
By default the endpoints are already set up WooCommerce > Settings > Advanced in the Page setup section.
Checkout endpoints ↑ Back to top
The following endpoints are used for checkout-related functionality and are appended to the URL of the /checkout page:
- Pay page –
- Order received (thanks) –
- Add payment method –
- Delete payment method –
- Set default payment method –
Account endpoints ↑ Back to top
The following endpoints are used for account-related functionality and are appended to the URL of the /my-account page:
- Orders –
- View order –
- Downloads –
- Edit account (and change password) –
- Addresses –
- Payment methods –
- Lost password –
- Logout –
Customizing endpoint URLs ↑ Back to top
The URL for each endpoint can be customized inWooCommerce > Settings > Advanced in the Page setup section.
Ensure that they are unique to avoid conflicts. If you encounter issues with 404s, go to Settings > Permalinks and save to flush the rewrite rules.
Using endpoints in menus ↑ Back to top
If you want to include an endpoint in your menus, you need to use the Links section:
Enter the full URL to the endpoint and then insert that into your menu.
Remember that some endpoints, such as view-order, require an order ID to work. In general, we don’t recommend adding these endpoints to your menus. These pages can instead be accessed via the my-account page.
Using endpoints in Payment Gateway Plugins ↑ Back to top
WooCommerce provides helper functions in the order class for getting these URLs. They are:
$order->get_checkout_payment_url( $on_checkout = false );
Gateways need to use these methods for full 2.1+ compatibility.
Troubleshooting ↑ Back to top
Endpoints showing 404 ↑ Back to top
- If you see a 404 error, go to WordPress Admin > Settings > Permalinks and Save. This ensures that rewrite rules for endpoints exist and are ready to be used.
If using an endpoint such as view-order, ensure that it specifies an order number. /view-order/ is invalid. /view-order/10/ is valid. These types of endpoints should not be in your navigation menus.
Endpoints are not working ↑ Back to top
On Windows servers, the web.config file may not be set correctly to allow for the endpoints to work correctly. In this case, clicking on endpoint links (e.g. /edit-account/ or /customer-logout/) may appear to do nothing except refresh the page. In order to resolve this, try simplifying the web.config file on your Windows server. Here’s a sample file configuration:
Pages direct to wrong place ↑ Back to top
Landing on the wrong page when clicking an endpoint URL is typically caused by incorrect settings. For example, clicking ‘Edit address’ on your account page takes you to the Shop page instead of the edit address form means you selected the wrong page in settings. Confirm that your pages are correctly configured and that a different page is used for each section.