Last active
October 16, 2017 12:19
-
-
Save Willem-Siebe/cf8474b5ca4e72880a04 to your computer and use it in GitHub Desktop.
Add the three custom fields available in WooCommerce PDF Invoices & Packing Slips to your own custom invoice template, see http://wordpress.org/support/topic/adding-text-field-below-the-table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Add the first custom fields available in WooCommerce PDF Invoices & Packing Slips to your own custom invoice template, see https://gist.github.com/Willem-Siebe/cf8474b5ca4e72880a04. --> | |
<?php if ( $wpo_wcpdf->get_extra_1() ): ?> | |
<div id="extra1"> | |
<?php $wpo_wcpdf->extra_1(); ?> | |
</div> | |
<?php endif; ?> | |
<!-- Add the second custom fields available in WooCommerce PDF Invoices & Packing Slips to your own custom invoice template, see https://gist.github.com/Willem-Siebe/cf8474b5ca4e72880a04. --> | |
<?php if ( $wpo_wcpdf->get_extra_2() ): ?> | |
<div id="extra2"> | |
<?php $wpo_wcpdf->extra_2(); ?> | |
</div> | |
<?php endif; ?> | |
<!-- Add the third custom fields available in WooCommerce PDF Invoices & Packing Slips to your own custom invoice template, see https://gist.github.com/Willem-Siebe/cf8474b5ca4e72880a04. --> | |
<?php if ( $wpo_wcpdf->get_extra_3() ): ?> | |
<div id="extra3"> | |
<?php $wpo_wcpdf->extra_3(); ?> | |
</div> | |
<?php endif; ?> |
Finally solved it by replacing $wpo_wcpdf->extra_1() with $this->wcpdf->extra_1().
Thanks for your contribution PhilipsEkuma, worked for me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Breaks website for me. Outputs only HTML without styling. Uncaught error: Call to a member function extra_1() on null in ...