Support » Plugin: WooCommerce PDF Invoices » Custom Field from Order

  • Read all the docs but it’s still not clear how to pull my custom fields from an order into the template.

    I tried <?php $this->custom_field(‘custom_fieldname’); ?>

    But was is $this? it produces an error? I also looked in your code for wpo_wcpdf_after_order_data to try a hook, but wpo_wcpdf_after_order_data doesn’t exists. Not sure…..???????

    EXAMPLE in header.php of your template you have.

    			if ( WPI()->get_option( 'template', 'company_logo' ) ) {
    				printf( '<img src="var:company_logo" style="max-height:40px;"/>' );
    			} else {
    				printf( '<h2>%s</h2>', esc_html( WPI()->get_option( 'template', 'company_name' ) ) );

    How do I add a custom meta field after this block?

  • The topic ‘Custom Field from Order’ is closed to new replies.