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

    (@pomegranate)

    Hi! Because this code has no reference to the order in question, it cannot determine where to retrieve the data. Just like the example for the product function from the documentation you’re linking to, you should be able to pass the order ID with the function.

    Based on this example:

    
    <?php wccf_print_product_prop_value(array('key' => 'UNIQUE_FIELD_KEY', 'item_id' => 'PRODUCT_ID')); ?>
    

    I’m guessing that the syntax for the wccf_print_checkout_field_value that you’re using should be like this:

    
    <?php wccf_print_checkout_field_value(array('key' => 'purchase_order_number', 'item_id' => $order->get_id())); ?>
    

    If that doesn’t work, I recommend contacting RightPress about this since it’s not directly covered in the documentation. They should be able to help with this.

    Good luck!

    Thread Starter miguel1876

    (@miguel1876)

    HI there

    Just a quick note to say thank you. This guided me in the right direction and it works perfectly now.
    Thanks so much for your help!

    Cheers

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