Title: WP-Invoice: JS Errors
Last modified: August 21, 2016

---

# WP-Invoice: JS Errors

 *  [enlightenmental](https://wordpress.org/support/users/enlightenmental/)
 * (@enlightenmental)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wp-invoice-js-errors/)
 * Updated to latest version of WP-Invoice
    – no other plugins active – default 
   theme
 * also running
    – Quotes – PDF Invoices
 * FireBug console is showing:
 * SyntaxError: JSON.parse: bad control character in string literal
 * Chrome Console is showing:
 * Uncaught SyntaxError: Unexpected token
 * x.extend.parseJSON
    e.parseJSON (anonymous function) c p.fireWith x.extend.ready
   q
 * this prevents the ajax features from firing (Approve Quote, Process Payment, 
   etc)
 * [http://wordpress.org/plugins/wp-invoice/](http://wordpress.org/plugins/wp-invoice/)

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

 *  Thread Starter [enlightenmental](https://wordpress.org/support/users/enlightenmental/)
 * (@enlightenmental)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wp-invoice-js-errors/#post-4515332)
 *     ```
       var site_url = 'https://www.domain.com:443/payments/?invoice_id=7317ffbe58d226f72d421cad486949fd';
   
             jQuery( document ).ready( function () {
   
               wpi = wpi || {};
               wpi.invoice_title = 'Sample Quotation';
               wpi.invoice_amount = 580.00;
               wpi.invoice_id = '3505';
               wpi.tax = '';
               wpi.business_name = 'Business';
               wpi.user_data = {city: '', state: '', country: ''}
               wpi.invoice_items = jQuery.parseJSON( '{"1":{"name":"Plugin Install and Configuration","description":"- Theme Updates\n- Settings Config\n- SSL Enabled\n- Authorize.net Config\n- Email settings","quantity":"2","price":"55","tax_rate":0,"line_total_tax":0,"line_total_before_tax":110,"line_total_after_tax":110,"id":"plugin_install_and_configuration"},"2":{"name":"Plugin Add-ons ","description":"- Dashboard Widgets\n-- Invoice Tracking\n-- Recurring Billing Calendar\n-- Paid Invoices \/ Monthly breakdown\n- PDF Invoice Customizations (Optional)","quantity":"1","price":"250","tax_rate":0,"line_total_tax":0,"line_total_before_tax":250,"line_total_after_tax":250,"id":"plugin_add_ons"},"3":{"name":"Usage Walkthrough","description":"","quantity":"1","price":"55","tax_rate":0,"line_total_tax":0,"line_total_before_tax":55,"line_total_after_tax":55,"id":"usage_walkthrough"},"4":{"name":"Custom Email Templates (MailPress)","description":"- plugin install and setup\n- custom email template creation\n","quantity":"2","price":"55","tax_rate":0,"line_total_tax":0,"line_total_before_tax":110,"line_total_after_tax":110,"id":"custom_email_templates_mailpress"},"5":{"name":"WP Core Updates (if needed)","description":"","quantity":"1","price":"55","tax_rate":0,"line_total_tax":0,"line_total_before_tax":55,"line_total_after_tax":55,"id":"wp_core_updates_if_needed"}}' );
   
               if ( typeof window._gaq != 'undefined' ) wpi.ga.tracking.init( {"attempting_pay_invoice":"true","view_invoice":"true"} );
   
                     } );
       ```
   
 *  Thread Starter [enlightenmental](https://wordpress.org/support/users/enlightenmental/)
 * (@enlightenmental)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wp-invoice-js-errors/#post-4515342)
 * The JSON validates.. so I’m not sure where the unexpected token is coming from
 *  Plugin Contributor [Anton Korotkoff](https://wordpress.org/support/users/anton-korotkoff/)
 * (@anton-korotkoff)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/wp-invoice-js-errors/#post-4515539)
 * Hello,
 * can I have an URL to the invoice with the issue on your site to check myself 
   what’s going on there?
 * Thanks.

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

The topic ‘WP-Invoice: JS Errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-invoice_c36510.svg)
 * [WP-Invoice - Web Invoice and Billing](https://wordpress.org/plugins/wp-invoice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-invoice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-invoice/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-invoice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-invoice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-invoice/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Anton Korotkoff](https://wordpress.org/support/users/anton-korotkoff/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/wp-invoice-js-errors/#post-4515539)
 * Status: not resolved