• Resolved comaxi

    (@comaxi)


    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)
  • Plugin Contributor Darren Peyou

    (@dpeyou)

    Hey @comaxi,

    I’m afraid it might not be so clear in what way you are trying to change the order of the Custom Field.
    Since you create it, why not reverse it from where you created it? It this custom field a multi-value field? I ask so I can understand better. ??

    Could you use screenshots to help with your description?
    Uploading Images to www.ads-software.com

    Plugin Contributor Darren Peyou

    (@dpeyou)

    Since we have not heard from you in a while, I will go ahead and mark this as resolved.

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.