echo status value from WC_Order Object of Woocommerce

How can I echo the status from the WC_Order Object from WooCommerce from a WordPress Plugin?

I seem to be able to echo every other value except that one. Here is the object:

Read More
$order = new WC_Order( $order_id );

WC_Order Object
(
    [id] => 222
    [prices_include_tax] => 
    [tax_display_cart] => excl
    [display_totals_ex_tax] => 1
    [display_cart_ex_tax] => 1
    [order_date] => 2014-12-17 01:30:06
    [modified_date] => 2014-12-17 01:30:08
    [customer_message] => 
    [customer_note] => 
    [post_status] => publish
    [status] => processing
)

I have been able to echo the id using:

echo $order->id;

When I try this, it’s blank:

echo $order->status;

Related posts

Leave a Reply

2 comments