• Resolved Afolayan Raphael Oluwaseun

    (@opensaucedeveloper)


    When a product is added to the cart, and the cart page is visited, the page gives the there has been a critical error, please visit the troubleshooting page.
    I need this to be fixed as soon as possible as my client is losing revenue day by day.

    If I deactivate the premium version, the error clears up.

    When I enable wp_debug, the error is expanded as such:
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function ACFWP\Models\Add_Products::lock_quantity_field_for_add_product(), 2 passed in /home/xxxx/wp-includes/class-wp-hook.php on line 303 and exactly 3 expected in /home/xxxx/wp-content/plugins/advanced-coupons-for-woocommerce/Models/Add_Products.php:461 Stack trace: #0 /home/xxxx/wp-includes/class-wp-hook.php(303): ACFWP\Models\Add_Products->lock_quantity_field_for_add_product('<div class="brn...', '44ac33abef9f864...') #1 /home/xxxx/wp-includes/plugin.php(189): WP_Hook->apply_filters('<div class="brn...', Array) #2 /home/xxxx/wp-content/themes/grotte/woocommerce/cart/cart.php(99): apply_filters('woocommerce_car...', '<div class="brn...', '44ac33abef9f864...') #3 /home/xxxx/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/xxxx/...') #4 /home/xxxxx/wp-content/plugins/woocommerce/includes/shortcodes/class- in /xxxx/wp-content/plugins/advanced-coupons-for-woocommerce/Models/Add_Products.php on line 461

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Josh Kohlbach

    (@jkohlbach)

    Hi @opensaucedeveloper,

    Thanks for the message. By the look of the log there your theme is overriding the WooCommerce Cart template incorrectly:

    /themes/grotte/woocommerce/cart/cart.php(99)

    This indicates on line 99 of your theme’s cart.php file its not passing the correct number of arguments for the hook.

    Can you reach out the theme developer and have them correct this? It wouldn’t only be a problem for our plugin, but also any other plugin that touches this hook.

    In the meantime, we’ll also raise a ticket to be a bit more defensive about when themes pass in the incorrect number of hook arguments.

    Thanks!

    Plugin Author Josh Kohlbach

    (@jkohlbach)

    Hi @opensaucedeveloper also as a premium version customer, can you please reach out to our support team, we can help you correct that template file if it’s urgent and the theme devs aren’t responding.

    https://advancedcouponsplugin.com/support/

    • This reply was modified 3 years, 1 month ago by Josh Kohlbach. Reason: add link to premium support page
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Activating Premium version Crashes cart page’ is closed to new replies.