• Just need to change de word “Total” at the final SUM of the invoice, not the filed, the name of this which appears printed. Thanks a lot!

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @dannwagner,

    Sorry for the late reply to this.

    Can you please tell me word you want to change to from the “Total” word in the invoice? Also, it would be great if you can share the screenshot of the word you are pointing to in the invoice. So we can assist you in a better way.

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Hi there! have been a change of plans. I just need to change te nome column QUANTIDADE para Qtde. – it appers to give more space to the column PRODUTO shows more characters maximizing the print invoice. The print is set above. Thanks a lot!

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @dannwagner,

    I am a bit unclear about your last response. Can you please confirm if you want to change the column name “QUANTIDADE” to “Qtde”?

    Please confirm so I can discuss it with the development team and will get back to you with an update of the same.

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Hi there! Thanks a lot for responding. Sure, it is exactly what I need. I do confirm!

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Dear friend, the information is clear now? thanks a lot!

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @dannwagner,

    Thank you for confirmation.

    Currently, we do not have a direct filter to achieve your requirements. However, we have the below filter code available with us to translate the text. So you can use this filter and set the text as new column name which you want to change to.

    Kindly add the below code snippet in the “functions.php” file of your currently active theme.

    /** * Add this code snippet in the functions.php file of your currently active theme.
    * Modified your Quantity title in print invoice.
    */
    function modify_customer_note_title( $translated_text, $text, $domain ) {
    if ( ‘woocommerce-delivery-notes’ === $domain ) {
    if ( ‘Quantidade’ === $text ) { // Replace with your desired title. $translated_text = ‘Qtde’;
    }
    }
    return $translated_text;
    }
    add_filter( ‘gettext’, ‘modify_customer_note_title’, 20, 3 );

    Once you have added this code snippet, please check and let us know if it changes the text as per your requirement or not.

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Thanks a lot for helping!

    The code isnt working, returns the error code bellow:

    N?o foi possível criar o snippet. Request failed with status code 500 (snippet isnt possible to be created)

    Do I have to personalize any part of the code with specfic informations? I put it there as you sended me.

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Do you understand what I mean? Let me know, thanks!

    Plugin Author priyankajagtap

    (@priyankajagtap)

    Hi @dannwagner,

    Below I have posted the code snippet again. Please copy and paste the code again and check if it works correctly.

    function modify_customer_note_title( $translated_text, $text, $domain ) {
    if ( 'woocommerce-delivery-notes' === $domain ) {
    if ( 'Quantidade' === $text ) {
    // Replace with your desired title.
    $translated_text = 'Qtde';
    }
    }
    return $translated_text;
    }
    add_filter( 'gettext', 'modify_customer_note_title', 20, 3 );


    Alternatively, you can manually change this text on line number 99 in the “print-content.php” file of our plugin. This file is located at wp-content/plugins/woocommerce-delivery-notes/templates/print-order/
    Screenshot for your reference: https://prnt.sc/uXuC8UfCumMG

    But this change will get removed after the plugin update and you will need to do this change manually after update.

    Please check and let us know if you have any questions.

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Dear friend, thanks a lot! Unfortunely none of the two ways had worked. I tried usando code snipets plugin, with several other functions personalizing it also. At the other way, I think its not working because the name changing is at the orginal language (english), the plugin uses brazilian portuguese.

    I’m very sad to give u too much work. Double checked al ot the changes. But also have not any trouble to try several times. I wish to give you all my thanks to this great work at the plugin! I’m very certain that will help too many others web designers which have not great code habilities. Best regards! Hope we can try again, please… All my love!

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    Can you still help me on that, please?

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    dear @priyankajagtap can you please try to help me again? I really tried several times to put the code, but it insnt working for some reason. Tryed to put the code at chat gpt also, nothing. I do really aprecciate your help, must some litle detail for it isnt working because the code appears to be great like always!

    Thread Starter Daniel Godoi Wagner

    (@dannwagner)

    @priyankajagtap trying to improve the function, I tryed with chat gpt and got it bellow, but still not working. any ideas, pleasseee?

    function modify_customer_note_title( $translated_text, $text ) {
    // Log detalhado para depura??o
    error_log( sprintf(‘Text: %s, Translated: %s’, $text, $translated_text) );

    // Modifica o texto "Quantidade"  
    if ( 'Quantidade' === $text ) {  
        $translated_text = 'Qtde';  
    }  
    return $translated_text;  

    }

    // Aplica o filtro ‘gettext’ e ‘ngettext’ sem a verifica??o de domínio
    add_filter( ‘gettext’, ‘modify_customer_note_title’, 20, 2 );
    add_filter( ‘ngettext’, ‘modify_customer_note_title’, 20, 2 );

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.