Change the order of custom field in product description
-
I’m using Advanced Custom Fields to create a custom field “book_author” . I added this custom field to my PDF invoice by using the code snippet:
add_action( 'wpo_wcpdf_after_item_meta', 'wpo_wcpdf_show_product_bookauthor', 10, 3 );function wpo_wcpdf_show_product_bookauthor ( $template_type, $item, $order ) {if (isset($item['product']) && !empty($bookauthor = $item['product']->get_meta('bookauthor'))) {echo 'Author: '.$bookauthor.'';}}
In the Product column of my PDF invoice, I want to display the Author name, add a <span class=”ILfuVd” lang=”en”><span class=”hgKElc”>line break</span></span>, and display the book name in the second line like this:
Product =============== Author: Gustave Flaubert Madame Bovary
How do I do that? Thanks for your help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Change the order of custom field in product description’ is closed to new replies.