![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
-
AuthorPosts
-
September 9, 2022 at 5:47 pm #1364457
Dear Team,
I am trying without success to modify the field of the form “Informations complémentaires”, where clients can write a personal message in a way to make the reference to the shipping disappear from the suggestions (since I’m selling guided tours, not physical items to ship): “Commentaires concernant votre commande: ex. CONSIGNES DE LIVRAISON” (livraison = shipping). At that place I would rather add something like “Commentaires concernant votre commande: ex. informations ou demandes spéciales concernant votre visite guidée”.
Is there a way to do that ?
I copy below the url of the form.
Thanks a lot for checking out and kind regards,
NatachaSeptember 10, 2022 at 10:57 am #1364497Hey HulaSlim,
Please try this in your functions.php file:
function natacha_change_woo_textarea_placeholder(){ ?> <script> jQuery(document).ready(function(){ $('textarea#order_comments').attr('placeholder','Commentaires concernant votre commande: ex. informations ou demandes spéciales concernant votre visite guidée'); }); </script> <?php } add_action('wp_footer', 'natacha_change_woo_textarea_placeholder', 999);
Best regards,
RikardSeptember 10, 2022 at 2:45 pm #1364532Hi Rikard,
Thank you for this code. Can you please jsut specify where to find “function php file” ? Is it Appearence/…/…/ or Enfold Child/…/…
Thanks and regards,
NatachaSeptember 10, 2022 at 2:51 pm #1364535Wait, I got it: it’s in Appearence, Editor…
I did it, but “Consignes de livraison” is still there.September 11, 2022 at 7:27 pm #1364633Hi,
Please try using a plugin like this instead: https://wordpress.org/plugins/loco-translate/
Best regards,
RikardSeptember 12, 2022 at 12:55 am #1364653Hi Rikart,
I downloaded the extension, even though this is a translation tool. Plus, now, where am I to find this form ? My problem is that I don’t know where it is, this is why I don’t know how to modify it. Do you have an idea ?
Thank you,
Regards,
NatachaSeptember 12, 2022 at 9:40 am #1364671Hi,
Thank you for the update.
You can use this filter to change the placeholder and label values of the order comments field.
function avf_custom_woocommerce_checkout_fields( $fields ) { $fields['order']['order_comments']['placeholder'] = 'Commentaires concernant votre commande: ex. informations ou demandes spéciales concernant votre visite guidées'; $fields['order']['order_comments']['label'] = 'Notes de commande (facultatif)'; return $fields; } add_filter( 'woocommerce_checkout_fields', 'avf_custom_woocommerce_checkout_fields' );
Place the code or filter in the functions.php file.
Best regards,
IsmaelSeptember 12, 2022 at 4:26 pm #1364785Wauuuu !
Your code is pure magic ! Problem solved in a second.
Thannnnx Ismael.
Best regards,
NatachaSeptember 12, 2022 at 4:52 pm #1364793 -
AuthorPosts
- The topic ‘Modify woocommerce form’ is closed to new replies.