What is more secure checking capabilities of user or checking role of user in WordPress plugin development
I would always go for the role “check”. As in your case: if ( current_user_can( ‘vendor’ ) ) { // do stuff } Or of course the distributor role as created by you. This way you can be sure that one is not interfering with the other and you can assign each role to its … Read more