• Resolved bubu678

    (@bubu678)


    I saw previously code from this forum that allowed this to be done, but it did not work.
    Here it is:

    
    add_filter('wf_alter_shipmentlabel_from_address', 'wf_include_order_status', 10, 3);
    
    function wf_include_order_status($from_address, $order, $address) {
    
       $order = ( WC()->version < '2.7.0' ) ? new WC_Order($order_id) : new wf_order($order);
       $from_address .= '<br>'.'Order Status: '.$order->get_status();
       return $from_address;
    }
    

    any guidance would be appreciated.
    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author webtoffee

    (@webtoffee)

    Hi @bubu678,

    Please try using below code snippet.

    add_filter('wf_pklist_alter_additional_fields', 'wt_pklist_add_order_status', 10, 3);
    function wt_pklist_add_order_status($extra_fields, $template_type, $order)
    {
    	if($template_type=='invoice')
    	{
      	 	$status =$order->get_status();
    		if(!empty($status))
    		{
    			$extra_fields[__('Order Status ')]=$status;
    		}
    	}
    	return $extra_fields;
    }
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.