• Resolved alexbaes

    (@alexbaes)


    Hello, In the invoices, the text (without taxes) appears after the amount, with the parentheses. How can I remove this text? I only want to show the total amount, for example $50, not $50(without tax).

    Thank you.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @alexbaes,

    Could you please send me a screenshot of a sample invoice/packing slip to see the place where this is displayed?

    Even better: If possible, please send me the HTML output source to see if we can handle this through a code snippet? To do it, just add &output=html at the end of your invoice/packing slip URL, then Right-click > Save as…, and save it as HTML. You can use https://filebin.net/ to upload the file and share the bin URL here.

    Thread Starter alexbaes

    (@alexbaes)

    Hi Yordan,
    thanks for your quick response.

    In this HTML you can see: “sin impuestos”, (without tax). I need delete this after the price.

    I suppose this appears because in the WooCommerce plugin it is indicated that the price is shown without taxes, but it is only my deduction.

    This is the URL of html: https://files.catbox.moe/gawsn3.html
    This i the URL of image: https://files.catbox.moe/ex63mt.png

    Thanks!!

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Thanks for providing the HTML and the screenshot, Alex!

    We could hide this label using CSS, but I think it’s dangerous because the class used by this label could be also used by other different tax labels. So the safest way to do it that I can think of is to remove the label directly from the HTML.

    Please add this code snippet to your site to do it:

    /**
     * Elimina la etiqueta '(sin impuestos)' del área de totales
     */
    add_filter( 'wpo_wcpdf_get_html', function( $html,$document ) {
    	$html = str_replace( '(sin impuestos)', '', $html);
    	return $html;
    }, 10, 2 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Let me know if it worked!

    Thread Starter alexbaes

    (@alexbaes)

    I have added the code in the functions.php of my child theme and it works perfect, thank you very much !!

    Another question, I have tried adding the year to the numbering format, so that it remains, for example, 5/22 or 5/2022 but it does not apply, only 5 continues to appear, without the year. It may be that it is applied for future invoices and not for those that are already created?

    Thank you.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    I’m glad to hear that it worked!

    Another question, I have tried adding the year to the numbering format, so that it remains, for example, 5/22 or 5/2022 but it does not apply, only 5 continues to appear, without the year. It may be that it is applied for future invoices and not for those that are already created?

    That’s right. When you update your number format, it will be applied to new orders, not existing ones. If you want to update the number format in your existing invoices, you can do it from the order editing screen, within the PDF document data panel, clicking on the editing/pencil icon, and then Save changes (without editing anything): your format invoice will be updated, leaving untouched the unformatted number.

    By the way, instead of using the year directly as suffix, use the [invoice_year] placeholder instead. For instance, if you /[invoice_year] in the suffix field (under WooCommerce > PDF Invoices > Documents > Invoice > Number format), your final invoices will be formatted as 1/2012, 2/2012, 3/2012, etc.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Delete text after price’ is closed to new replies.