Orders::ajax_user_can()
Checks the current user’s permissions
Source
File: src/Tickets/Commerce/Admin_Tables/Orders.php
public function ajax_user_can() {
$post_type = get_post_type_object( $this->screen->post_type );
return ! empty( $post_type->cap->edit_posts ) && current_user_can( $post_type->cap->edit_posts );
}
Changelog
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |