WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Print Invoice & Delivery Note
Can I add Shipping Address to invoice template? (3 posts)

  1. mitchman333
    Member
    Posted 12 months ago #

    I realize that Invoice recipient is different from Delivery Notes recipient, but I'd like to have both on the same for printing in PDF form - invoice template. Basically Billing Address AND Shipping address on same form. I capture all the Shipping address info and in my industry these addresses tend to be different.

    If anyone has the php code or an example I'd really appreciate it. Thanks.

    -- Mitchman

    http://wordpress.org/plugins/woocommerce-delivery-notes/

  2. equinestaff
    Member
    Posted 11 months ago #

    Any luck with this mitchman33. ? As i want the same thing or at least the address shown as the shipping address not the billing address.

  3. Gritcore
    Member
    Posted 6 months ago #

    Check out woocommerce-delivery-notes/templates/print/print-delivery-notes.php , lines 22-31

    <div id="order-listing">
    					<h3><?php _e( 'Recipient', 'woocommerce-delivery-notes' ); ?></h3>
    					<div class="shipping-info">
    						<?php if( wcdn_get_template_type() == 'invoice' ) : ?>
    							<?php wcdn_billing_address(); ?>
    						<?php else : ?>
    							<?php wcdn_shipping_address(); ?>
    						<?php endif ?>
    					</div><!-- .shipping-info -->
    				</div><!-- #order-listing -->

    Change those lines to something like this:

    <div id="order-listing">
    					<h3><?php _e( 'Bill To', 'woocommerce-delivery-notes' ); ?></h3>
    					<div class="shipping-info">
    						<?php if( wcdn_get_template_type() == 'invoice' ) : ?>
    							<?php wcdn_billing_address(); ?>
    </div>					<div style="padding-top:20px;"></div>
    					<h3><?php _e( 'Ship To', 'woocommerce-delivery-notes' ); ?></h3>
    					<div class="shipping-info">
    							<?php wcdn_shipping_address(); ?>
    						<?php else : ?>
    							<?php wcdn_shipping_address(); ?>
    						<?php endif ?>
    					</div><!-- .shipping-info -->
    				</div><!-- #order-listing -->

    What the code does: When printing an Invoice, the word "Recipient" is changed to "Bill To". Beneath the "Bill To" address is 20px of padding, followed by another heading that says "Ship To", followed by the shipping address.

    What the code does not: The output of "Print Delivery Note" is not changed.

Reply

You must log in to post.

About this Plugin

About this Topic