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

    (@pomegranate)

    Hi! Two links that will probably help with this:

    Let us know if you have any further questions!

    Thread Starter nexsn

    (@nexsn)

    Hi Ewout!

    thanks for your fast response!
    I downlaoded the plugin which was mentioned on the 2nd link for finding woocommerce custom fields and looked for the field.

    I more or less found it, I guess?!
    But I cannot work with it. Please find the screenshot here: https://pandalasocks.at/wp-content/uploads/2021/04/PS_CustomFieldInOrdner.png

    Am I Right that this is not useable?

    Plugin Contributor Ewout

    (@pomegranate)

    I see – that’s in fact not a custom field but a ‘fee’, which WooCommerce registers as a special type of order item (basically like a product).

    The easiest way to display that would be to create a custom template, and then copy the totals section from the invoice – this is where WooCommerce prints fees (as you will see reflected in the invoice itself!). However, that does print prices and also prints the other totals, which I suspect you don’t want in the packing slip (considering it’s a gift box)…

    Alternatively you could loop through the fees directly and print all the fee names without the prices:

    
    foreach ( $order->get_fees() as $fee_item_id => $fee_item ) {
    	echo $fee_item->get_name() . '<br>';
    }
    

    Hope that helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add custom field without pro-version’ is closed to new replies.