I'm trying to move customer order notes field to another field group, but because of other plugin overrides, I need to override WooCommerce template files too, so I need to move this code:
foreach ( $checkout->get_checkout_fields( 'order' ) as $key => $field ) :
woocommerce_form_field( $key, $field, $checkout->get_value( $key ) );
endforeach;
from: "mytheme/woocommerce/checkout/form-shipping.php"
to: "mytheme/woocommerce/checkout/review-order.php".
Now I'm getting duplicated fields, how to prevent duplicates within foreach loop?
foreach ( array_unique($checkout->get_checkout_fields('order')) as $key => $field )
– SteveKarray_unique
– Darko