How to check value of Custom Checkbox Product Meta when looping through order items
问题 I created a custom checkbox meta in Dokan new-single-product.php template: <div class="dokan-form-group"> <div class="dokan-input-group"> <?php dokan_post_input_box( $post_id, '_custom_field', array( 'label' => __('Custom Checkbox','dokan') ), 'checkbox' ); ?> </div> Then used the following code to store the values: add_action( 'woocommerce_product_options_general_product_data', 'wc_custom_add_custom_fields' ); function wc_custom_add_custom_fields() { global $woocommerce, $post; echo '<div