• Resolved mediaryte

    (@mediaryte)


    I am looking for documentation or examples on how to modify the order totals array/loop on the PDF template:

    <?php foreach( $wpo_wcpdf->get_woocommerce_totals() as $key => $total ) : ?>
    <tr class="<?php echo $key; ?>">
    <td class="no-borders"></td>
    <th class="description"><?php echo $total['label']; ?></th>
    </tr>
    <?php endforeach; ?>

    Ultimately, I want to be able to control the display of items added via WooCommerce Product Add-ons. Currently, they are output to the totals.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! You can use the wpo_wcpdf_woocommerce_totals filter for this.
    https://github.com/wpovernight/woocommerce-pdf-invoices-packing-slips/blob/dfb7afa5db2c737c120e079af38e853c7d149061/includes/class-wcpdf-functions.php#L538

    If you want backend control over this, the premium templates extension will come in handy (the WooCommerce Product Add-Ons are added as fees, which is a block you can remove from the totals in the Customizer).

    Hope that helps!
    Ewout

    Thread Starter mediaryte

    (@mediaryte)

    Thank you, Ewout.

    After purchasing and installing the premium templates, we are able to get a new PDF generated for most orders, except for those that have the WooCommerce Product Add-Ons. The PDF is not generated and an unstyled page is loaded, excluding anything past where the Fees would appear. Any suggestions?

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! There was an incompatibility with the latest WooCommerce Checkout Add-Ons release (1.10). I have fixed this and pushed a new release for the Premium Templates extension, 2.3.3.

    If you have any other questions about the premium extensions, please email us at [email protected] with your license key or order number. As a paying customer you are entitled to priority email support and officially we’re also not allowed to provide support for our premium plugins via these forums.

    Ewout

    Is it possible to rename label for Taxes in Order totals? Where can I find this string?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Order Totals Custom Display IN PDF Template’ is closed to new replies.