[WC] Change Order Comments Placeholder

Add this snippet at the end of your **functions.php** file.

  

function yit_woocommerce_checkout_fields( $fields ) {
    if ( array_key_exists( 'order', $fields ) ) {
        if ( isset( $fields['order']['order_comments']['placeholder'] ) ) {
            $fields['order']['order_comments']['placeholder'] = __( 'YOUR TEXT HERE, DON'T CHANGE TEXTDOMAIN', 'yit' );
        }
    }

    return $fields;
}
add_filter( 'woocommerce_checkout_fields', 'yit_woocommerce_checkout_fields' );
Was this article helpful?
0 out of 0 found this helpful

Back to Help Center

Powered by Zendesk