Display ACF field on invoice
-
Hey,
Following various guidelines I’ve tried to implement an ACF custom field (which is entered on product level by the admin) on the invoice between the product name and the meta data for the variable.
I’ve used this line of code in the functions.php. It’s showing the title “Pattern color:” but not showing the value. Could you please guide me in fixing this?
add_action( 'wpo_wcpdf_before_item_meta', 'sss_invoice_pattern_color', 10, 2 ); function sss_invoice_pattern_color ($template_type, $order) { $document = wcpdf_get_document( $template_type, $order ); if ($template_type == 'invoice') { ?> <div class="pattern-color-invoice"> <strong>Pattern color:</strong> <?php the_field( 'pattern_color' ); ?></div> <?php } }
Many thanks,
ReijerThe page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Display ACF field on invoice’ is closed to new replies.