Title: Completing Orders invoice error.
Last modified: May 28, 2019

---

# Completing Orders invoice error.

 *  [Sociality](https://wordpress.org/support/users/sociality/)
 * (@sociality)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/completing-orders-invoice-error/)
 * So I have this problem: When I go to orders and change to completed, I get this
   error page, yet the status is indeed changed. Any ideas what the problem might
   be?
 * `Fatal error: Uncaught Error: Call to undefined function BEWPI() in /home/socia464/
   public_html/kedas.gr/wp-content/uploads/woocommerce-pdf-invoices/templates/invoice/
   simple/minimal/body.php:78 Stack trace: #0 /home/socia464/public_html/kedas.gr/
   wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-document.
   php(221): require() #1 /home/socia464/public_html/kedas.gr/wp-content/plugins/
   woocommerce-pdf-invoices/includes/abstracts/abstract-document.php(241): BEWPI_Abstract_Document-
   >buffer('/home/socia464/...') #2 /home/socia464/public_html/kedas.gr/wp-content/
   plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-document.php(176):
   BEWPI_Abstract_Document->get_html() #3 /home/socia464/public_html/kedas.gr/wp-
   content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-invoice.
   php(311): BEWPI_Abstract_Document->generate('F') #4 /home/socia464/public_html/
   kedas.gr/wp-content/plugins/woocommerce-pdf-invoices/includes/woocommerce-pdf-
   invoices.php(556): BEWPI_Abstract_Invoice->generate() #5 /home/soc in /home/socia464/
   public_html/kedas.gr/wp-content/uploads/woocommerce-pdf-invoices/templates/invoice/
   simple/minimal/body.php on line 78`

Viewing 1 replies (of 1 total)

 *  Thread Starter [Sociality](https://wordpress.org/support/users/sociality/)
 * (@sociality)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/completing-orders-invoice-error/#post-11580324)
 * Update:
 * In the referred line 78, we replaced BEWPI()->templater() with $templater which
   is declared at the start of the file and everything seems to be in order. So 
   this works in creating the PDF invoices and now emails with the pdf printed are
   sent correctly as well.
 * `<?php echo $templater->get_meta( '{tax_registration_number_field}' ); ?>`
 * Kind of worried we broke something somewhere though, it’s not good practice to
   change the plugins directly either anyway. Any ideas would rock 🙂
    -  This reply was modified 6 years, 10 months ago by [Sociality](https://wordpress.org/support/users/sociality/).

Viewing 1 replies (of 1 total)

The topic ‘Completing Orders invoice error.’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices/assets/icon-128x128.png?rev=1128583)
 * [Invoices for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Sociality](https://wordpress.org/support/users/sociality/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/completing-orders-invoice-error/#post-11580324)
 * Status: not resolved