Why does current_user_can(‘edit_posts’) return true, but current_user_can(‘edit_post’, $post->ID) returns false?

I have a plugin with a custom post type (with 'capability_type' => 'post') and a custom user role (test_user). When I check if a user is allowed to edit a post (of the CPT and which this user created) with current_user_can, I get different results when using edit_post and edit_posts (with the s).

Assign user role by text field in WordPress (Woocommerce)

I have a virtual store with woocommerce where I use the USER REGISTRATION plugin to register new customers. This plugin allows the creation of custom fields. I created a custom text field called “STATE REGISTRATION”. In this field the user can write something or leave it blank. My demand is that when creating a new … Read more

Why is my Custom Post Type not showing up after adding capabilities?

I’m trying to add a custom post types with capabilities, so a custom user role can do certain things with them. Eventually the custom role is a Client, and the post a Website, and I want clients to be able to log in and view their websites. However, the post type is not showing up as soon as I add capabilities => 'website'. Why is is not showing up? I was following this tutorial and here it seems to work at 3:54 (with vehicles as a custom post type).