Getting Variables from Woocommerce
-
Hey guys,
I have searched my issue on the internet but was not able to fix it.
I am trying to get custumer details from WooCommerce and print them on a pdf.
The second part works perfectly fine via FPDF and FPDI.
But i cant get the name, adress, order name, telephone number or email.Thats how it looks right now in my functions.php of my child theme:
$order= new WC_Order($order_id);
$name= $order->billing_first_name;
$sur= $order->billing_last_name;
$mail=$order->billing_email;All three variables are empty.
Do I have to include/require something or what is the problem?Thanks in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Getting Variables from Woocommerce’ is closed to new replies.