| @@ -75,11 +75,13 @@ | ||
| 75 | 75 | |
| 76 | 76 | /** |
| 77 | 77 | * Display Subscription Content. |
| 78 | 78 | * |
| 79 | - * @param Int $id Post ID. | |
| 79 | + * @param int $id Post ID. | |
| 80 | 80 | */ |
| 81 | - public function view_subscrpt_content( int $id ) { | |
| 81 | + public function view_subscrpt_content( $id ) { | |
| 82 | + $id = absint( $id ); // typecast to int. | |
| 83 | + | |
| 82 | 84 | $subs_post = get_post( $id ); |
| 83 | 85 | $author_id = $subs_post ? (int) $subs_post->post_author : 0; |
| 84 | 86 | $current_user_id = get_current_user_id(); |
| 85 | 87 | $user_is_admin = current_user_can( 'manage_options' ); |
| @@ -303,9 +305,9 @@ | ||
| 303 | 305 | 'author' => get_current_user_id(), |
| 304 | 306 | 'posts_per_page' => 10, |
| 305 | 307 | 'paged' => $current_page, |
| 306 | 308 | 'post_type' => 'subscrpt_order', |
| 307 | - 'post_status' => array( 'pending', 'active', 'on_hold', 'cancelled', 'expired', 'pe_cancelled' ), | |
| 309 | + 'post_status' => array( 'pending', 'active', 'on_hold', 'cancelled', 'expired', 'pe_cancelled', 'completed' ), | |
| 308 | 310 | ); |
| 309 | 311 | |
| 310 | 312 | $postslist = new \WP_Query( $args ); |
| 311 | 313 | wc_get_template( |