woocommerce_enable_order_notes_field

woocommerce_enable_order_notes_field

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_enable_order_notes_field') is found 3 times:

  • /includes/admin/meta-boxes/class-wc-meta-box-order-data.php line 563

    }
    }
    }

    if ( apply_filters( ‘woocommerce_enable_order_notes_field’, ‘yes’ === get_option( ‘woocommerce_enable_order_comments’, ‘yes’ ) ) && $order->get_customer_note() ) { // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    echo ‘

    ‘ . esc_html( __( ‘Customer provided note:’, ‘woocommerce’ ) ) . ‘ ‘ . wp_kses( nl2br( esc_html( $order->get_customer_note() ) ), array( ‘br’ => array() ) ) . ‘

    ‘;
    }
    ?>

  • /includes/admin/meta-boxes/class-wc-meta-box-order-data.php line 613
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    * @since 2.1.0
     *
     * @param bool TRUE if the note should be displayed. FALSE otherwise.
     */
    if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) ) :
        ?>
        <p class="form-field form-field-wide">
            <label for="customer_note"><?php esc_html_e( 'Customer provided note', 'woocommerce' ); ?>:</label>
            <textarea rows="1" cols="40" name="customer_note" tabindex="6" id="excerpt" placeholder="<?php esc_attr_e( 'Customer notes about the order', 'woocommerce' ); ?>"><?php echo wp_kses( $order->get_customer_note(), array( 'br' => array() ) ); ?></textarea>
        </p>
    <?php endif; ?>
  • /templates/checkout/form-shipping.php line 53
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    </div>
    <div class="woocommerce-additional-fields">
        <?php do_action( 'woocommerce_before_order_notes', $checkout ); ?>
     
        <?php if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) ) : ?>
     
            <?php if ( ! WC()->cart->needs_shipping() || wc_ship_to_billing_address_only() ) : ?>
     
                <h3><?php esc_html_e( 'Additional information', 'woocommerce' ); ?></h3>
     
            <?php endif; ?>