Display ACF of user on Packing Slip
-
Hi,
I am trying to display an advanced custom field on the packing slip by using the user id. I have no trouble getting the id and I can see the title on the packing slip in the correct position, however, the field appears blank. Here’s the code I’ve used…
add_action( 'wpo_wcpdf_after_order_data', 'woops_sage_customer_number', 10, 2 ); function woops_sage_customer_number ($template_type, $order) { if ($template_type == 'packing-slip') { ?> $customerid = $order->get_user_id(); ?> <tr class="customer-number"> <th>Customer Number:</th> <td><?php the_field( 'customer_number', $customerid ); ?></td> </tr> <?php } }
Any help would be greatly appreciated.
Many thanks,
Matt
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display ACF of user on Packing Slip’ is closed to new replies.