Last active
April 21, 2021 15:34
-
-
Save Spirecool/817a421bcf4aa26b8906a9ba9a53943b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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