Title: 200 parse error
Last modified: May 4, 2024

---

# 200 parse error

 *  Resolved [ascanatian](https://wordpress.org/support/users/ascaron4o/)
 * (@ascaron4o)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/200-parse-error-2/)
 * Hi,
 * When I try to add following in custom invoice.php template:
 *     ```wp-block-code
       <?php echo do_shortcode('[shortcode data_id="' . $this->order_number() . '"]'); ?>
       ```
   
 * It gives me 200: parseerror when I try to check on the template

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Darren Peyou](https://wordpress.org/support/users/dpeyou/)
 * (@dpeyou)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17737379)
 * Hi [@ascaron4o](https://wordpress.org/support/users/ascaron4o/),
   What are you
   trying to do?
 *  Thread Starter [ascanatian](https://wordpress.org/support/users/ascaron4o/)
 * (@ascaron4o)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17740277)
 * Hi, I’m trying to add shortcode from another plugin to the invoice template in
   order to show the information I want on the invoice.
 *  Plugin Contributor [dwpriv](https://wordpress.org/support/users/dwpriv/)
 * (@dwpriv)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17741935)
 * What error do you get in your logs as [outlined here](https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/where-to-find-debug-logs/)?
   You’re looking for logs prefixed with `wpo_wcpdf` or `fatal_errors`
    -  This reply was modified 2 years, 1 month ago by [dwpriv](https://wordpress.org/support/users/dwpriv/).
      Reason: fixed incorrect link
 *  Thread Starter [ascanatian](https://wordpress.org/support/users/ascaron4o/)
 * (@ascaron4o)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17742066)
 * in wpo_wcpdf – Fatal error: Call to a member function get_items() on bool ..(/
   home/..leading to plugin file dir)
 * Problem is if I hardcoded it like so:
 *     ```wp-block-code
       <?php echo do_shortcode('[shortcode order_id="23123"]'); ?>
       ```
   
 * its working, but if I try to put it dynamically like so:
 *     ```wp-block-code
       <?php echo do_shortcode('[shortcode order_id="' . $this->order_number() . '"]'); ?>
       ```
   
 * It’s not working.
 * So what is the right way to put the order number dynamically in the invoice.php?
    -  This reply was modified 2 years, 1 month ago by [ascanatian](https://wordpress.org/support/users/ascaron4o/).
    -  This reply was modified 2 years, 1 month ago by [ascanatian](https://wordpress.org/support/users/ascaron4o/).
    -  This reply was modified 2 years, 1 month ago by [ascanatian](https://wordpress.org/support/users/ascaron4o/).
    -  This reply was modified 2 years, 1 month ago by [ascanatian](https://wordpress.org/support/users/ascaron4o/).
 *  Plugin Contributor [dwpriv](https://wordpress.org/support/users/dwpriv/)
 * (@dwpriv)
 * [2 years ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17744221)
 * Are you adding this in a custom template? If so, you can try this:
 * `$this->order->get_order_number();`
 * If not, how are you adding the snippet and where are you trying to print the 
   information on the invoice?
 *  Thread Starter [ascanatian](https://wordpress.org/support/users/ascaron4o/)
 * (@ascaron4o)
 * [2 years ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17744822)
 * Perfect, now it works!
 *     ```wp-block-code
       <?php echo do_shortcode('[shortcode order_id="' . $this->order->get_order_number() . '"]'); ?>
       ```
   
 * And yes, I’m adding in custom invoice.php template -> woocommerce/pdf/theme/invoice.
   php
 * Thanks a lot!
 *  Plugin Contributor [dwpriv](https://wordpress.org/support/users/dwpriv/)
 * (@dwpriv)
 * [2 years ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17746870)
 * No problem and thanks for your confirmation. I will mark this topic as resolved
   🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘200 parse error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [dwpriv](https://wordpress.org/support/users/dwpriv/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/200-parse-error-2/#post-17746870)
 * Status: resolved