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.3.3

apply_filters('woocommerce_enable_order_notes_field') is found 3 times:

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

    echo ‘

    ‘ . esc_html( $field[‘label’] ) . ‘: ‘ . wp_kses_post( $field_value ) . ‘

    ‘;
    }
    }

    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() ) . ‘

    ‘;
    }
    ?>

  • /includes/admin/meta-boxes/class-wc-meta-box-order-data.php line 614
    							 * @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() ); ?></textarea>
    								</p>
    							<?php endif; ?>
    
  • /templates/checkout/form-shipping.php line 53
    </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; ?>