• Resolved brigittexo

    (@brigittexo)


    Hello,

    Any way to add Vendor name in the invoice? and also how to integrate with PI WooCommerce order date time and type? I would like to add delivery and time fields.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @brigittexo

    The vendor name should be replaced by the Dokan plugin. Are you using the Dokan Invoice?

    About the PI date and time, try this:

    add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_pi_date_time', 10, 2 );
    function wpo_wcpdf_pi_date_time ($template_type, $order) {
        if ( !empty($order) && $template_type == 'invoice') {
            ?>
            <tr class="delivery-type">
                <th>Delivery Type:</th>
                <td><?php echo $order->get_meta('pi_delivery_type'); ?></td>
            </tr>
            <tr class="delivery-date">
                <th>Delivery Date:</th>
                <td><?php echo $order->get_meta('pi_delivery_date'); ?></td>
            </tr>
            <tr class="delivery-time">
                <th>Delivery Time:</th>
                <td><?php echo $order->get_meta('pi_delivery_time'); ?></td>
            </tr>
            <?php
        }
    }

    If you never worked with actions/filters, please read this documentation: How to use filters

    Thread Starter brigittexo

    (@brigittexo)

    Ok thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dokan’ is closed to new replies.