Get company name using php
-
Hello,
I added to my custom form a “company name” input field, and I would like to get it from the users’ metadata on the backend, using php.
How can I achieve that?the following does not work:
$order_id = $order->get_id();
$user_id = get_post_meta($order_id, ‘_customer_user’, true);$store_name = get_user_meta( $user_id, ‘company_name’, true );
and neither the following:
$user_id = $order->get_user_id();
$store_name = get_user_meta( $user_id, ‘company_name’, true );Thanks, Mor.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get company name using php’ is closed to new replies.