I am trying to get the billing email of an order in woocommerce v2.5.5 However its giving me this error:
Call to undefined method WC_Order::get_billing_email()
Here is my order object : print_r($order)
$order_id = $order->get_order_number(); $customer_email = $order->get_billing_email(); $shipping_country = $order->get_shipping_country(); $order_items = $order->get_items();
Both get_billing_email and get_shipping_country isn't working.
Condition : I can't upgrade the plugin as the site is really old and i'm 100% sure it'll cost me another 50 to 60 hours to fix everything. Just need a quick fix.