You need to add this code snippet into functions.php file of your theme.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | function bf_keep_order_comments_field( $fields ) { if( empty( $fields['order'] ) ) { $fields['order'] = array(); } if( empty( $fields['order']['order_comments'] ) ) { $fields['order']['order_comments'] = array( 'type' => 'textarea', 'class' => array( 'notes' ), 'label' => __( 'Order notes', 'woocommerce' ), 'placeholder' => esc_attr__( 'Notes about your order, e.g. special notes for delivery.', 'woocommerce' ), ); } return $fields; } add_filter( 'woocommerce_checkout_fields', 'bf_keep_order_comments_field', 100 ); |