mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
11 lines
479 B
Text
11 lines
479 B
Text
add_filter( 'woocommerce_checkout_fields', 'wc_labels_inside_checkout_fields', 9999 );
|
|
|
|
function wc_labels_inside_checkout_fields( $fields ) {
|
|
foreach ( $fields as $section => $section_fields ) {
|
|
foreach ( $section_fields as $section_field => $section_field_settings ) {
|
|
$fields[$section][$section_field]['placeholder'] = $fields[$section][$section_field]['label'];
|
|
$fields[$section][$section_field]['label'] = '';
|
|
}
|
|
}
|
|
return $fields;
|
|
}
|