• Resolved Bob

    (@orionlearn)


    Trying to add an my Woo ‘Order ID’ to the simple template. I tried order_id and get_id but it does not work and really messes up the template.

    Here is the code I inserted

    <tr
    class=”order-id”><th><?php _e( ‘Order ID:’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th><td><?php $this->order_id(); ?></td>
    </tr>

    Any help is appreciated

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    These both work:

    
    <?php echo $order_id; ?>
    
    
    <?php echo $order->get_id(); ?>
    
    Thread Starter Bob

    (@orionlearn)

    Thanks!

    They did not bring in the order ID. The field is blank.

    I tried both and they do not disrupt the PDF, but no data in the field

    Here is my code:

    </tr>
    <tr class=”order_id”><th><?php _e( ‘Order ID:’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th><td><&It;?php echo $order->get_id(); ?>></td>
    </tr>

    Bob

    Thread Starter Bob

    (@orionlearn)

    Hey, Solved my own error in the code when I saw it on the post. Works perfectly! Thanks!! Appreciate the help.

    For anyone else, here is the correct code:

    <tr class=”order_id”><th><?php _e( ‘Order ID:’, ‘woocommerce-pdf-invoices-packing-slips’ ); ?></th><td><?php echo $order->get_id(); ?></td>
    </tr>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Order ID Code’ is closed to new replies.