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

    (@pomegranate)

    Hi! The complete order object is in:

    <?php $this->order; ?>

    and subsequently, the order_id is:

    <?php $this->order->id; ?>

    If you’re doing something outside of the template (in a filter that doesn’t have the order passed as an argument), you can replace $this with $wpo_wcpdf->export:

    <?php $wpo_wcpdf->export->order->id; ?>

    Happy holidays ??

    Thread Starter jayjayjay1

    (@jayjayjay1)

    thank you!!

    Plugin Contributor Ewout

    (@pomegranate)

    You’re welcome! If you can spare a minute, I would really appreciate a review here on www.ads-software.com.

    Thanks and have a great day!

    Thread Starter jayjayjay1

    (@jayjayjay1)

    sorry, i had no time to test this before. with this code I also don’t have it in a variable.

    I need it this way:
    <?php $test = $this->order->id;
    echo $test; ?>

    how is that possible?

    Plugin Contributor Ewout

    (@pomegranate)

    Hi!
    $this->order->id; is the variable. So you can just do:

    <?php echo $this->order->id; ?>

    Thread Starter jayjayjay1

    (@jayjayjay1)

    now it works!

    thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Get Order-Id’ is closed to new replies.