Include order status in PDF

Plugin Contributor
Mohamad

(@mohamadntr)

Hi @katmacau,

Please add this code snippet to your website:

/**
* WP Overnight - PDF Invoices & Packing Slips for WooCommerce
* Add the order status to the order data section of the document.
*
* @param $document_type
* @param $order
*
* @return void
*/
function wpo_order_status_after_order_data( $document_type, $order ) {
echo '<tr class="order-status">
<th>Order Status</th>
<td>', $order->get_status(), '</td>
</tr>';
}

add_action( 'wpo_wcpdf_after_order_data', 'wpo_order_status_after_order_data', 10, 2 );

Best regards

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer