• Resolved cisma

    (@cisma)


    Hi,

    I wanted to delete the subtotal and shipment lines from the invoice. I deleted the following code in woocommerce-pdf-invoices-packingslips.php:

    /**
    * Return/show the order subtotal
    */
    public function get_order_subtotal( $tax = ‘excl’, $discount = ‘incl’ ) { // set $tax to ‘incl’ to include tax, same for $discount
    return $this->functions->get_order_subtotal( $tax, $discount );
    }
    public function order_subtotal( $tax = ‘excl’, $discount = ‘incl’ ) {
    $this->functions->order_subtotal( $tax, $discount );
    }

    /**
    * Return/show the order shipping costs
    */
    public function get_order_shipping( $tax = ‘excl’ ) { // set $tax to ‘incl’ to include tax
    return $this->functions->get_order_shipping( $tax );
    }
    public function order_shipping( $tax = ‘excl’ ) {
    $this->functions->order_shipping( $tax );
    }

    I also deleted the same in this file: class-wcpdf-functions.php

    Unfortunately, it’s not working. Even if I delete the entire content of the file; everything is still working and looks the same. It’s not about caching, I also deleted the plugin already, installed again & it’s not something I can change in a template file.

    Any ideas?

    • This topic was modified 7 years, 5 months ago by cisma.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello,
    We do not recommend changing core plugin files.
    These functions are not used for the totals in the simple template, which are preformatted by WooCommerce and not the plugin.

    If you only want to hide a row (or multiple rows) in the totals, you can do that with custom CSS (use the HTML output option in the Status tab to find the classes to use).
    For an easy solution I can recommend the Premium Templates extension, which lets you configure, reorganize, add or remove totals directly from the settings via the customizer.

    Hope that helps!
    Ewout

Viewing 1 replies (of 1 total)
  • The topic ‘Changing woocommerce-pdf-invoices-packingslips.php’ is closed to new replies.