Skip to content

Commit

Permalink
= 4.2.6.8.1 =
Browse files Browse the repository at this point in the history
~ Fixed: query by status on List LP Order
  • Loading branch information
tungnxt89 committed May 30, 2024
1 parent ad5a90b commit b1a02ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inc/custom-post-types/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ public function posts_where_paged( $where ) {
}
}

// Filter by order status
if ( ! empty( $wp_query->get( 'post_status' ) ) ) {
$status = $wp_query->get( 'post_status' );
$where .= $wpdb->prepare( " AND {$lp_db->tb_posts}.post_status = %s", $status );
}

return $where;
}

Expand Down

0 comments on commit b1a02ba

Please sign in to comment.