Thank you for your answer!
It solves the Conditional statement.
But how to display selected values labels?
I tried echo $value; but it displays only “Array”.
I checked the doc: http://www.advancedcustomfields.com/resources/checkbox and find this:
/*
* Displaying a single value's Label
*/
$field = get_field_object('field_name');
$value = get_field('field_name');
$label = $field['choices'][ $value ];
But I don’t understand how the $label works? Where [‘choices’] comes from?
Hello,
I reopen this topic because I can’t display custom fields for product variations.
In the custom field post type selection, I choose “variations” but I can’t see the custom field when the product type is variation.
When I choose “Product”, the custom field shows when I select simple product.
Looking forward from reading to you.