If a link generated by {{ customer.unsubscribe_url }} opens a 404 error page instead of the customer's communication preferences, refreshing WordPress permalinks may resolve the issue.
How the communication preferences page works#
ShopMagic provides the communication preferences screen automatically. You do not need to create a separate WordPress page or add a shortcode.
The link's destination depends on the customer and your site's configuration:
- Registered customers: when the WooCommerce account integration is enabled, the link points to the Communication section of My Account. Customers need to log in to access their preferences.
- Guest customers: the link points to a standalone page, normally under
/communication-preferences/, with customer identification and verification parameters included in the URL.
Opening the link displays communication preferences. It does not immediately unsubscribe the customer; they can review and update their subscriptions on that screen.
Why a 404 error can occur#
WordPress uses rewrite rules to recognize ShopMagic's communication preferences URL. If those rules are outdated or have not been applied correctly, the URL may return a 404 error.
How to refresh the rewrite rules#
- Make sure ShopMagic is active.
- In your WordPress dashboard, go to Settings → Permalinks.
- Without changing the permalink structure, click Save Changes.
- Open the complete unsubscribe link from a ShopMagic email again.
Saving the permalink settings refreshes WordPress rewrite rules. If outdated rules caused the error, the communication preferences screen should now open.
If the link still does not work#
- Check the complete URL. Use the link generated by
{{ customer.unsubscribe_url }}. Do not replace it with a manually entered/communication-preferences/address or remove its query parameters. - For registered customers, check My Account. Confirm that the WooCommerce My Account page works and that the customer is logged in to the correct account.
- Check caching and redirects. Clear any cached 404 response and check whether redirects or security rules alter or block the generated URL.
- Check your server's permalink configuration. If other WordPress URLs also return 404 errors, ask your hosting provider to check the rewrite configuration.
If the page displays “Sorry, but something is wrong with your request.”, this is a different issue from a missing route. ShopMagic could not find the customer or validate the link. Check a newly generated email link and keep all its parameters intact.
Note: Communication preferences are built into ShopMagic. No additional unsubscribe plugin, dedicated WordPress page, or shortcode is required.
