{"id":55000,"date":"2020-03-27T17:54:16","date_gmt":"2020-03-27T16:54:16","guid":{"rendered":"https:\/\/samuelchopard.ch\/wiki\/?p=55000"},"modified":"2020-03-27T17:55:06","modified_gmt":"2020-03-27T16:55:06","slug":"remove-address-street-field-placeholder-in-checkout-form","status":"publish","type":"post","link":"https:\/\/samuelchopard.ch\/wiki\/library\/remove-address-street-field-placeholder-in-checkout-form\/","title":{"rendered":"Remove address street field placeholder in checkout form"},"content":{"rendered":"<p><!--more--><br \/>\nPaste the following in the theme&#8217;s <em>functions.php<\/em>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">\/* Remove address street field placeholder *\/\r\n\/\/ Hook in\r\nadd_filter( 'woocommerce_default_address_fields' , 'custom_override_default_address_fields' );\r\n\r\n\/\/ Our hooked in function - $address_fields is passed via the filter!\r\nfunction custom_override_default_address_fields( $address_fields ) {\r\n     $address_fields['address_1']['placeholder'] = '';\r\n\r\n     return $address_fields;\r\n}<\/pre>\n<p>Source: <a target=\"_blank\" href=\"https:\/\/docs.woocommerce.com\/document\/tutorial-customising-checkout-fields-using-actions-and-filters\/\">https:\/\/docs.woocommerce.com\/document\/tutorial-customising-checkout-fields-using-actions-and-filters\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Paste the following in the theme's functions.php: \/* Remove address street field placeholder *\/ \/\/ Hook in add_filter( 'woocommerce_default_address_fields' , [...]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[58,216,376,327],"class_list":["post-55000","post","type-post","status-publish","format-standard","hentry","category-woocommerce","tag-checkout","tag-placeholder","tag-street","tag-woocommerce"],"_links":{"self":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/55000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/comments?post=55000"}],"version-history":[{"count":2,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/55000\/revisions"}],"predecessor-version":[{"id":55002,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/posts\/55000\/revisions\/55002"}],"wp:attachment":[{"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/media?parent=55000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/categories?post=55000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/samuelchopard.ch\/wiki\/wp-json\/wp\/v2\/tags?post=55000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}