Ich benutze woocommerce_checkout_fields
Filter für die Anpassung der Platzhalter in WooCommerce Checkout-Seite.Anpassen von Platzhalter in Abrechnungs-/Versandformularen
add_filter('woocommerce_checkout_fields' , 'custom_override_checkout_fields');
function custom_override_checkout_fields($fields) {
$fields['billing']['billing_first_name']['placeholder'] = 'Name';
$fields['billing']['billing_last_name']['placeholder'] = 'Surname';
$fields['billing']['billing_email']['placeholder'] = 'Email';
$fields['billing']['billing_company']['placeholder'] = 'Company Name';
$fields['billing']['billing_phone']['placeholder'] = 'Phone';
$fields['billing']['billing_postcode']['placeholder'] = 'Zip Code';
$fields['billing']['billing_city']['placeholder'] = 'City';
$fields['shipping']['shipping_first_name']['placeholder'] = 'Name';
$fields['shipping']['shipping_last_name']['placeholder'] = 'Surname';
$fields['shipping']['shipping_city']['placeholder'] = 'City';
$fields['shipping']['shipping_postcode']['placeholder'] = 'Zip Code';
return $fields;
}
Dies funktioniert nur für Kassenformular.
Wie können 'Platzhalter' in allen Versand- und Rechnungsformularen angepasst werden?
Danke.
Vielen Dank! @LoicTheAztec deine Lösung ist perfekt, ich benutze das 'id' Feld wie folgt: 'if ($ args [' id '] ==' billing_first_name ') $ args [' placeholder '] =' Name '; ' – Stone