php - ACF Returning value of checkbox - not label

I am running the following in my functions.php file:
$query = new WP_Query(array(
'post_type' => 'gear',
'orderby' => 'title',
'order' => 'ASC',
'author' => $current_user->ID,
'posts_per_page' => -1,
'meta_key' => 'brand_preselect',
'orderby' => 'meta_value',
'meta_key' => 'category_tax',
'orderby' => 'meta_value',
));
foreach($query->posts as $product_id=>$macthed_product){
$choices[$macthed_product->ID] = '<span>' . $macthed_product->brand_preselect . '</span>' . $macthed_product->post_title;
}
This all works pretty well, but the problem is $macthed_product->brand_preselect is returning the value of the checkbox and not the Label. On this field (brand_preselect) I have it only set to return the Label though. How do I get it to return the Label and not the value?
Answer
Solution:
Solved via CBroe - $zz = get_field('brand_preselect',$macthed_product->ID);
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: fastcgi sent in stderr: "primary script unknown" while reading response header from upstream
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.