Custom my account endpoint in Woocommerce just for a specific user role
Following the woocommerce documentation, I added an endpoit to my-account page in woocommerce. I want to make this endpoint visible only to a specific user role, lets say shop_manager. Is there a way to redirect to a 404 page users…