| @@ -140,8 +140,10 @@ | ||
| 140 | 140 | LP_LESSON_CPT, |
| 141 | 141 | LP_ORDER_CPT, |
| 142 | 142 | ]; |
| 143 | 143 | |
| 144 | + UserService::instance()->add_capabilities_for_roles(); | |
| 145 | + | |
| 144 | 146 | foreach ( $item_types as $item_type ) { |
| 145 | 147 | UserService::instance()->add_capabilities_for_roles( $item_type ); |
| 146 | 148 | } |
| 147 | 149 | } |
| @@ -776,9 +778,9 @@ | ||
| 776 | 778 | function learn_press_update_user_profile_change_password() { |
| 777 | 779 | try { |
| 778 | 780 | $user = wp_get_current_user(); |
| 779 | 781 | if ( ! $user ) { |
| 780 | - throw new Exception( 'error_lp_profile_update_pass', 'The user is invalid' ); | |
| 782 | + throw new Exception( __( 'The user is invalid', 'learnpress' ) ); | |
| 781 | 783 | } |
| 782 | 784 | |
| 783 | 785 | $old_pass = LP_Request::get_param( 'pass0', '', 'text', 'post' ); |
| 784 | 786 | if ( empty( $old_pass ) ) { |