fix: test if `post_status` is empty

This commit is contained in:
vnmedeiros 2022-10-04 09:26:21 -03:00
parent 4b5bafd43d
commit 61d570f0e6
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ class Items extends Repository {
$clauses = [];
$user_id = get_current_user_id();
$post_status = $wp_query->get( 'post_status' );
$post_status = is_array($post_status) ? $post_status : explode(",", $post_status);
$post_status = is_array($post_status) || empty($post_status) ? $post_status : explode(",", $post_status);
foreach ($this->fetching_from_collections as $collection) {