I got a problem with value = 0 for meta_query checkbox field:
$args = [
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => - 1,
'meta_query' => array(
array(
'key' => 'test_field',
'value' => 0,
'compare' => 'LIKE',
),
),
];
This code works fine if value is 1,2,3 etc. But when I set meta_query value to 0 i get all posts which has not empty test_field in post.
How can i got only posts with value = 0 ?
i have tried change compare to IN or = but its not words for checkbox fields
EDIT:
It works wrong if value is 0 or 1, for other numeric values its fine