• Resolved oceancolleen

    (@oceancolleen)


    Hi,
    Is it possible to get the shipping date on the packing slip as soon as the order is completed? I think this is the way it used to be, but now it takes a few days to fill in the date, and it’s not the date that it was shipped.
    Thanks,

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

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Colleen,
    Are you using a plugin to set the shipping date? Or do you just want to print the date the order was completed? If it’s the latter, you can use the following code snippet to get that date on the Packing Slip:

    
    add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_shipping_date', 10, 2 );
    function wpo_wcpdf_shipping_date ($template_type, $order) {
    	$date_completed = $order->get_date_completed();
        if ($template_type == 'packing-slip' && !empty($date_completed)) {
            ?>
            <tr class="shipping-date">
                <th>Shipping Date:</th>
                <td><?php echo $date_completed->date_i18n( wc_date_format() ); ?></td>
            </tr>
            <?php
        }
    }
    

    Hope that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Shipping Date on Packing Slip’ is closed to new replies.