See I have a problem / I now want to display a custom field in a place where this field has several options that I tick if I see it in the product tab. If I do not show, do not display the following codes. Thank you.
The code below shows the field:
$badges = get_field('badges_product'); if( $badges && in_array('licensed', $badges) ): ?> <p>Test</p> <?php endif; ?>
But despite this code does not display:
If I put this code instead of the code above:
global $product; $units_sold = get_post_meta( $product->id, 'badges_product', true ); echo ''. sprintf( __( '%s', 'woocommerce' ), $units_sold ).'';
Now I'm going to put the third code in place of the second code, but I can not do anyone can help me out? Thanks.