| @@ -207,9 +207,9 @@ | ||
| 207 | 207 | $user_id = get_current_user_id(); |
| 208 | 208 | $userdata = get_userdata($user_id); |
| 209 | 209 | $data = array(); |
| 210 | 210 | if (isset($_SERVER['REMOTE_ADDR'])) { |
| 211 | - $user_ip = $_SERVER['REMOTE_ADDR']; | |
| 211 | + $user_ip = isset( $_SERVER['REMOTE_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) : ''; | |
| 212 | 212 | $data['ip'] = $user_ip; |
| 213 | 213 | } |
| 214 | 214 | $data['first_name'] = $userdata->first_name; |
| 215 | 215 | $data['last_name'] = $userdata->last_name; |
| @@ -499,9 +499,9 @@ | ||
| 499 | 499 | return null; |
| 500 | 500 | } |
| 501 | 501 | $orders = array(); |
| 502 | 502 | // $from = date(get_option('date_format'), strtotime('-' . intval($data['display_from']) . ' days')); |
| 503 | - $from = date('Y-m-d H:i:s', Helper::generate_time_string($data)); | |
| 503 | + $from = gmdate('Y-m-d H:i:s', Helper::generate_time_string($data)); | |
| 504 | 504 | $enrolled = get_posts( |
| 505 | 505 | array( |
| 506 | 506 | 'post_type' => 'tutor_enrolled', |
| 507 | 507 | 'post_status' => 'completed', |
| @@ -536,8 +536,9 @@ | ||
| 536 | 536 | return $data; |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | 539 | public function doc(){ |
| 540 | + /* translators: %1$s: Tutor LMS installed & configured link URL, %2$s: documentation link URL, %3$s: video tutorial link URL, %4$s: Integration with Tutor LMS link URL */ | |
| 540 | 541 | return sprintf(__('<p>Make sure that you have <a href="%1$s" target="_blank">Tutor LMS installed & configured</a> to use its campaign & course selling data. For further assistance, check out our step by step <a target="_blank" href="%2$s">documentation</a>.</p> |
| 541 | 542 | <p>🎦 Watch <a target="_blank" href="%3$s">video tutorial</a> to learn quickly</p> |
| 542 | 543 | <p>👉 NotificationX <a target="_blank" href="%4$s">Integration with Tutor LMS</a></p>', 'notificationx'), |
| 543 | 544 | 'https://wordpress.org/plugins/tutor/', |