Skip to content

Commit

Permalink
fix: adjust node_id check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiulodro committed Jul 17, 2023
1 parent c9ee2c9 commit 9ceb09f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/hub/admin/class-woo.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static function pre_get_posts( $query ) {
return null;
}

if ( empty( $_GET['node_id'] ) && '0' !== $_GET['node_id'] ) { // zero is a valid value.
if ( ! isset( $_GET['node_id'] ) || ! is_numeric( $_GET['node_id'] ) ) { // zero is a valid value.
return null;
}
$query->query_vars['meta_query'][] = [
Expand Down

0 comments on commit 9ceb09f

Please sign in to comment.