Hi @cubomagicodesign,
For adding the field and displaying the status of the order in any language. Please add the below code in your active theme’s functions.php file or use a plugin like Code Snippets:
function add_extra_field( $fields, $order ) {
$new_fields = array();
if( $order->get_status() ) {
$new_fields['status'] = array(
'label' => 'Order Status',
'value' => wc_get_order_status_name( $order->get_status() ),
);
}
return array_merge( $fields, $new_fields );
}
add_filter( 'wcdn_order_info_fields', 'add_extra_field', 10, 2 );
I didn’t understand the second thing which you wanted to add to your invoice. Can you please elaborate on it?
Thank you, solved.
Yes, the second situation is:
when we open edit order woocomerce>orders there is a field for us to create notes (order notes) for both the seller and the customer, I wanted these notes to be also in the print.
Hi @cubomagicodesign,
We are sharing a screenshot, where we are displaying admin order notes printed in the invoice. Let me know, in this way you wanted to print order notes from woocommerce?
Screenshot:- https://prnt.sc/RIH1t84ybQIe
Regards,
Moksha.
Hi @cubomagicodesign,
This is the screenshot of when we open edit order woocomerce>orders.
Screenshot:- https://prnt.sc/mRpirESQI7QE
Regards,
Moksha.
-
This reply was modified 4 years, 2 months ago by
Moksha Shah.
Hi @cubomagicodesign,
Ohh that’s great, so please take a backup of the existing plugin before you replace the below files.
Please Replace the below file in the path: WooCommerce-delivery-notes/templates/print-order/.
File:- https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0
Style.css:- https://www.dropbox.com/s/yo9cgq10ylvdeda/style.css?dl=0
Please note that updating to a new version of the plugin will wipe out these changes.
Regards,
Moksha.