Skip to content

Instantly share code, notes, and snippets.

@Spirecool
Last active April 21, 2021 15:34
Show Gist options
  • Select an option

  • Save Spirecool/817a421bcf4aa26b8906a9ba9a53943b to your computer and use it in GitHub Desktop.

Select an option

Save Spirecool/817a421bcf4aa26b8906a9ba9a53943b to your computer and use it in GitHub Desktop.
<?php
add_filter( 'woocommerce_checkout_fields' , 'popcorn_labels_placeholders', 9999 );
function popcorn_labels_placeholders( $f ) {
// first name can be changed with woocommerce_default_address_fields as well
$f['billing']['billing_first_name']['label'] = 'Quel est ton nom de famille?';
$f['order']['order_comments']['placeholder'] = 'Ton surnom?';
return $f;
}
//Ou autre code :
add_filter( 'woocommerce_checkout_fields', 'bbloomer_remove_woo_checkout_fields' );
function bbloomer_remove_woo_checkout_fields( $fields ) {
unset( $fields['billing']['billing_first_name'] );
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment