Title: Uncaught ReferenceError: accounting is not defined
Last modified: August 31, 2016

---

# Uncaught ReferenceError: accounting is not defined

 *  Resolved [colighto](https://wordpress.org/support/users/colighto/)
 * (@colighto)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/)
 * Hello,
 * After updating our version of woocommerce here I found out that we encounter 
   javascript errors on our product page that uses woocommerce gravity product addon
   the error says:
 * `Uncaught ReferenceError: accounting is not defined`
 * so I check for the library of this from directory:
 * /wp-content/plugins/woocommerce/assets/js/admin
 * and found that the file accounting.min.js was missing so I decided to download
   the file and upload it manually on our site and it did fix the issue is this 
   library permanently removed on latest versions?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

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

 *  Plugin Contributor [royho](https://wordpress.org/support/users/royho/)
 * (@royho)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039449)
 * No it is not missing. Make sure you’re running the latest WooCommerce Gravity
   Forms Product add-ons 2.10.5
 *  Thread Starter [colighto](https://wordpress.org/support/users/colighto/)
 * (@colighto)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039458)
 * Its strange the file isn’t really there I check on our other site where I only
   patch with the latest woocommerce update. The directory was:
 * wp-content/plugins/woocommerce/assets/js/admin
 * and accounting.min.js was not there was not sure if the product addons is the
   only one pointing on this file but otherwise I can’t update to product add-ons
   2.10.5 something on the update won’t allow our gravity form to display on our
   product page.
 *  Plugin Contributor [royho](https://wordpress.org/support/users/royho/)
 * (@royho)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039459)
 * So in the latest WooCommerce the file has been moved to within accounting sub
   folder. That is the reason why your version of Gravity Forms Product Addons is
   not seeing it. But as I mentioned if you update to the latest, it will know where
   to find it. I hope that is clear.
 *  Thread Starter [colighto](https://wordpress.org/support/users/colighto/)
 * (@colighto)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039464)
 * I see, but as I mention I can’t update to 2.5.10 right now cause the product 
   addon will stop displaying on our product page but I tried to check on the changes
   on the code on line 55 of gravity-product-addons.php it was changed from:
 * `add_action( 'woocommerce_before_add_to_cart_button', array($this, 'woocommerce_gravityform'),
   10 );`
 * to
 * `add_action( 'woocommerce_before_add_to_cart_form', array($this, 'on_woocommerce_before_add_to_cart_form'));`
 * I tried reverting it to original action hook which was woocommerce_before_add_to_cart_button
   also if I do this:
 * `add_action( 'woocommerce_before_add_to_cart_form', array($this, 'woocommerce_gravityform'));`
 * The gravity product form will display but outside the add to cart form so the
   fields will not be included during submission on adding to the cart.
 * I was not sure the reason for the change but this is what surely causing the 
   issue on our end.
 *  Thread Starter [colighto](https://wordpress.org/support/users/colighto/)
 * (@colighto)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039465)
 * I think I found the problem now it was on the back compatibility condition on
   function on_woocommerce_before_add_to_cart_form our woocommerce is updated but
   we are using a custom theme I guess I just need to update our theme for this 
   new version though.
 *  Plugin Contributor [royho](https://wordpress.org/support/users/royho/)
 * (@royho)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039466)
 * I am not really sure why you can’t update but doing what you suggest is just 
   masking the issue. Perhaps look into why it won’t display if you used the latest?
 *  Thread Starter [colighto](https://wordpress.org/support/users/colighto/)
 * (@colighto)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039486)
 * Its ok now I just update our display and add action woocommerce_single_variation
   thanks for the help royho
 *  [tabasco86](https://wordpress.org/support/users/tabasco86/)
 * (@tabasco86)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039741)
 * Hi,
 * I updated to the 2.10.5 version of woocommerce-gravityforms-product-addons and
   now suddenly the form doesnt appear on my product page anymore.
    The form still
   is selected in the system Hence I downgraded again until I figure out what might
   be causing this. I have the latest gravity forms installed too. Does anybody 
   have an idea?
 * Thanks for your help?

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

The topic ‘Uncaught ReferenceError: accounting is not defined’ is closed to new 
replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3640790)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [tabasco86](https://wordpress.org/support/users/tabasco86/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-accounting-is-not-defined/#post-7039741)
 * Status: resolved