If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WooCommerce. How to edit placeholder text for checkout page

This guide will show you how to edit placeholder text for the checkout page in WooCommerce template.

  1. To edit the text mentioned, first thing to do is to login to the admin panel of your website.

  2. Then navigate to the Appearance -> Editor section and open custom-functions.php file.

    WooCommerce.How_to_edit_placeholder_text_for_checkout_page1

  3. Copy the code given and paste it below the opening php tag:

    add_filter('woocommerce_default_address_fields', 'override_address_fields');
    function override_address_fields( $address_fields ) {
    $address_fields['address_1']['placeholder'] = 'Test';
    $address_fields['address_2']['placeholder'] = 'Test123';
    return $address_fields;
    }

    WooCommerce.How_to_edit_placeholder_text_for_checkout_page1

  4. Please, note, that default placeholder text will be removed, you can add custom one by pasting it between the quotes.

  5. More information on how to create filters to override default checkout fields and replace/add custom placeholder text can be found here

  6. After that save the file and refresh the checkout page to see the changes.

This it the end of the tutorial. Now you know how to edit placeholder text for checkout page.

Feel free to check the detailed video tutorial below:

WooCommerce. How to edit placeholder text for checkout page