• Resolved colighto

    (@colighto)


    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://www.ads-software.com/plugins/woocommerce/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor royho

    (@royho)

    No it is not missing. Make sure you’re running the latest WooCommerce Gravity Forms Product add-ons 2.10.5

    Thread Starter colighto

    (@colighto)

    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

    (@royho)

    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

    (@colighto)

    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

    (@colighto)

    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

    (@royho)

    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

    (@colighto)

    Its ok now I just update our display and add action woocommerce_single_variation thanks for the help royho

    tabasco86

    (@tabasco86)

    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.