• Resolved LuukDriessen

    (@luukdriessen)


    Awesome plugin, nice layout!

    I have only 1 question,

    I would like to implement 2 custom fields in the template.
    From another plugin developer I got this code:

    <?php
    $date = get_post_meta( $order_id, 'jckwds_date', true);
    $time = get_post_meta( $order_id, 'jckwds_timeslot', true);
    ?>
    
    <?php if( $date || $time ) { ?>
        <table>
            <!-- Delivery -->
            <tr>
                <td class="border" colspan="3">
                    <?php if( $date ) echo $date.'<br>'; ?>
                    <?php if( $time ) echo $time; ?>
                </td>
           </tr>
        </table>
    <?php } ?>

    I am implementing this code in the body.php from the simple layout.

    Unfirtunately, I can’t get it to work.

    Could you help me with this problem?

    Thanks in advance

    https://wordpress.org/plugins/woocommerce-pdf-invoices/

Viewing 1 replies (of 1 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    Just replace $order_id with $this->order->id and you will be good to go. Let me know if it works.

    $date = get_post_meta( $this->order->id, 'jckwds_date', true);
    $time = get_post_meta( $this->order->id, 'jckwds_timeslot', true);

    Would you be so kind to rate the plugin? It would support future development a lot! Many thanks in advance. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Implementing custom fields’ is closed to new replies.