| @@ -160,9 +160,9 @@ | ||
| 160 | 160 | * @throws Exception |
| 161 | 161 | */ |
| 162 | 162 | public function check_capabilities_create() { |
| 163 | 163 | $user = wp_get_current_user(); |
| 164 | - if ( ! user_can( $user, 'edit_' . LP_LESSON_CPT . 's' ) ) { | |
| 164 | + if ( ! user_can( $user, 'edit_' . LP_LESSON_CPT, $this->question_id ) ) { | |
| 165 | 165 | throw new Exception( __( 'You do not have permission to create answer.', 'learnpress' ) ); |
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | |