Support » Plugin: Print Invoice & Delivery Notes for WooCommerce » Custom field not showing
Custom field not showing
-
Hello. Thanks for the plugin!
I have a custom field, I already included the code (previously changed) provided in the help in my functions.php to display it, but without success.
-
Hi @felipexa,
Regarding the query, could you please share the code with us which you have included in the functions.php file so that we can verify once and update you the code if needed.
Please do share the same so that we can assist you in a better way.
Regards,
Kenil ShahThanks for the feedback.
I used the code below.
This custom field was created with the Checkout Field Editor and Manager for WooCommerce plugin, from @acowebs, and the field name is correct.function custom_order_fields( $fields, $order ) { $new_fields = array(); if( get_post_meta( $order->id, 'order_horario_para_entrega', true ) ) { $new_fields['order_horario_para_entrega'] = array( 'label' => 'Horário para entrega: ', 'value' => get_post_meta( $order->id, 'order_horario_para_entrega', true ) ); } return array_merge( $fields, $new_fields ); } add_filter( 'wcdn_order_info_fields', 'custom_order_fields', 10, 2 );
Hi @felipexa,
Thank you for sharing the code.
I will pass this to our developer to check and get back to you with an update.
Regards,
Kenil ShahNo updates for this case?
Thanks!Hi @felipexa,
Sorry for the delay in response.
The code you shared with us is correct so can you just check that the meta key you are using to get the values of that field is correct or not.
Please do let us know.
Regards,
Kenil ShahI used the Store Toolkit plugin for WooCommerce and realized that my field name started with a _
After that, the custom code worked correctly.
This can be an interesting tip to put in help, the Toolkit helps to be sure of the name of the field.@felipexa Vc consegue me ajudar? nossa, já tentei de tudo e não consigo fazer aparecer um campo personalizado na fatura de impressão 🙁
@andersonmp use o plugin que indiquei acima, o Toolkit. Entre em um pedido e no final da tela vai aparecer uma listagem com todos os campos personalizados associados aos pedidos. É só usar o nome do campo que você quer, com o código disponibilizado pelo próprio plugin.
@felipexa Obrigado pro me responder, fico muito agradecido mesmo!!!!… pior que o campo que eu quero que apareça, não retorna nenhum código 🙁 já não sei mais o que faço!!!
https://prnt.sc/vfn9s4@felipexa Estou usando o plugin WooCommerce Custom Payment Gateway Pro, nele o cliente digita um valor para troco.
Campo no checkout onde o cliente digita >>> https://prnt.sc/vfnaky
@andersonmp eu acho que a melhor e mais simples forma é verificar com os desenvolvedores do plugin como que esse campo pode ser “chamado”. Como você tem a versão Pro, um contato com os desenvolvedores é facilitado e eles poderão auxiliar como que você faz a integração entre o campo gerado no plugin e o código fornecido pelo “Print Invoice & Delivery Notes”.
@felipexa Vlw… vou ver o que consigo fazer. Mas obrigado!!! Esse plugin foi TOP Store Toolkit plugin for WooCommerce
- You must be logged in to reply to this topic.