• Resolved Paul

    (@pawelszroeder)


    Hello! I’ve noticed that there is disabled option for using placeholder for fields City and Postcode. All other WooCommerce plaholder fields are editable.

    I cannot even change it by function:

    add_filter('woocommerce_default_address_fields', 'override_address_fields');
    function override_address_fields( $address_fields ) {
    $address_fields['city']['placeholder'] = 'np. Poznań';
    $address_fields['postcode']['placeholder'] = 'np. 61-144';
    return $address_fields;
    }

    This function works only when I disable plugin.

    Any suggestion? I’m using free and pro plugin. Tested on 2 different websites.

    • This topic was modified 8 years, 1 month ago by Paul.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support przemyslawrosa

    (@przemyslawrosa)

    Hello @pawelszroeder,

    Thank you for creating this topic, but as you own a PRO license, you are entitled to 1-on-1 e-mail support. Let’s continue this thread using our e-mail support channel.

    Cheers,
    Przemyslaw

    Thread Starter Paul

    (@pawelszroeder)

    Yeah, but this problem is also with free version so I think solution should be also here for other users 🙂

    Plugin Support przemyslawrosa

    (@przemyslawrosa)

    Hi @pawelszroeder,

    filter below allows to overwrite placeholders, also with the Flexible Checkout Fields plugin enabled.

    Please, paste it please to the functions.php file of your theme.

    add_filter( 'woocommerce_checkout_fields', function( $address_fields ) {
    $address_fields['billing']['billing_city']['placeholder'] = 'np. City placeholder';
    $address_fields['billing']['billing_postcode']['placeholder'] = 'np. Postcode placeholder';
    return $address_fields;
    }, 9999 );

    Cheers,
    Przemyslaw

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘City and Postcode placeholder’ is closed to new replies.