← All changes
|
inc/rest-api/v1/admin/class-lp-admin-rest-tools-controller.php
+2
-2
4.4.3
→
4.4.8
View file →
| @@ -567,9 +567,9 @@ | ||
| 567 | 567 | foreach ( $data as $user_course ) { |
| 568 | 568 | $user_id = $user_course['user_id'] ?? 0; |
| 569 | 569 | $course_id = $user_course['course_id'] ?? 0; |
| 570 | 570 | if ( ! $user_id || ! $course_id ) { |
| 571 | - throw new Exception( 'User or Course is invalid', 'learnpress' ); | |
| 571 | + throw new Exception( __( 'User or Course is invalid', 'learnpress' ) ); | |
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | $can_handle = apply_filters( |
| 575 | 575 | 'learn-press/assign-courses-to-users/can-handle', |
| @@ -646,9 +646,9 @@ | ||
| 646 | 646 | foreach ( $data as $user_course ) { |
| 647 | 647 | $user_id = $user_course['user_id'] ?? 0; |
| 648 | 648 | $course_id = $user_course['course_id'] ?? 0; |
| 649 | 649 | if ( ! $user_id || ! $course_id ) { |
| 650 | - throw new Exception( 'User or Course is invalid', 'learnpress' ); | |
| 650 | + throw new Exception( __( 'User or Course is invalid', 'learnpress' ) ); | |
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | // Delete data user who already enrolled this course. |
| 654 | 654 | LP_User_Items_DB::getInstance()->delete_user_items_old( $user_id, $course_id ); |