An endpoint is an extra part in the website URL that is detected to show different content when present.
For example: You may have a ‘my account’ page shown at URL
yoursite.com/my-account. When the endpoint ‘edit-account’ is appended to this URL, making it
yoursite.com/my-account/edit-account then the Edit account page is shown instead of the My account page.
This allows you to show different content without the need for multiple pages and shortcodes, and reduces the amount of content that needs to be installed.
Endpoints are located at SC Commerce > Settings > Advanced.
The following endpoints are used for checkout-related functionality and are appended to the URL of the /checkout page:
The following endpoints are used for account-related functionality and are appended to the URL of the /my-account page:
The URL for each endpoint can be customized in SC Commerce > 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.
If you want to include an endpoint in your menus, you need to use the Custom 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.
SC Commerce 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 compatibility.
/view-order/10/is valid. These types of endpoints should not be used in your navigation menus.
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.