• Resolved koepi



    since some WC-Updates I have following error output in cart:
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function uni_cpo_woocommerce_cart_item_quantity(), 2 passed in /var/www/vhosts/webundprint24.de/httpdocs/webundprint24_website_shop/wp-includes/class-wp-hook.php on line 286 and exactly 3 expected in /var/www/vhosts/webundprint24.de/httpdocs/webundprint24_website_shop/wp-content/plugins/uni-woo-custom-product-options-premium/includes/uni-cpo-core-functions.php:963 Stack trace: #0 /var/www/vhosts/webundprint24.de/httpdocs/webundprint24_website_shop/wp-includes/class-wp-hook.php(286): uni_cpo_woocommerce_cart_item_quantity(‘<div class=”qua…’, ‘abc99d6b9938aa8…’) #1 /var/www/vhosts/webundprint24.de/httpdocs/webundprint24_website_shop/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘<div class=”qua…’, Array) #2 /var/www/vhosts/webundprint24.de/httpdocs/webundprint24_website_shop/wp-content/themes/wp24/woocommerce/cart/cart.php(121): apply_filters(‘woocommerce_car…’, ‘<div class=”qua…’, ‘abc99d6b9938aa8…’) #3 /var/www/vhosts/webundprint24.de/httpdoc in /var/www/vhosts/webundprint24.de/httpdocs/webundprint24_website_shop/wp-content/plugins/uni-woo-custom-product-options-premium/includes/uni-cpo-core-functions.php on line 963


    That error appears even on products in the cart where CPO isn’t active on that product. Seems to be a general issue not depending on a special product item.

    Any idea?
    Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor mr.psiho



    Could you switch to Storefront theme and deactivate all the plugins except WC and Uni CPO? Thanks!

    Thanks for your reply, mr.psiho.
    Unfortunately a strong issue!

    1. All plugins deactivated one by one: no success, fatal error in cart (column quantity)
    2. Tried standard themes twenty ninteen / twenty twelve: work fine
    3. Disabled CPO using my own theme: quantity in cart okay!

    CPO-price-calculation on product-page: okay. Only cart-quantity issue with fatal error output.
    In former CPO-versions everything was fine.
    Conclusion: issue has something to do with bad working together of CPO with my theme (theme by themler template designer).

    Need help, please!

    Plugin Contributor mr.psiho



    The issue must be in the theme. Ask your theme developer/provider for fixing the issue.


    I understand you don’t want to have a closer look to my issue when CPO is working proper on standard themes.
    BUT CPO worked on my themler themes weeks ago also. Theme didn’t change. What happened??
    Really no idea?? The issue is within function uni_cpo_woocommerce_cart_item_quantity().

    How to do a fresh install an activation of Uni CPO?
    Does it make sense to delete and recreate all options and products? (What a work. Grrr…)


    Plugin Author moomooagency


    The issue might be simply that you don’t update wc templates in your theme.

    Solution is to update everything: theme, wc, uni cpo. And not just something one or two. Your theme may be abandoned or customly done and doesn’t have updates, but it is solely your responsibility to keep it up to date. Things are changing in wc, I update uni cpo accordingly.

    Okay, I’ll see what can I do with my template.
    I installed CPO v4.0.7 again and … everything fine.
    Please, could you provide each update version up to now for testing purpuse?
    Or where can I find former plugin versions of CPO?

    Thank you.

    Plugin Contributor mr.psiho



    Generally, we do not give access to previous versions of pro version of the plugin. I also discourage you from using older versions. Older versions are not supported. You will be always asked to update to the latest.

    Different versions of free version of the plugin is available here on wordpress.org, if I am not mistaken. You can try them.

    Find the solution on myself.
    There is a missing argument in my template cart.php.

    File: /wp-content/themes/your-theme/woocommerce/cart/cart.php

    Wrong: echo apply_filters(‘woocommerce_cart_item_quantity’, $product_quantity, $cart_item_key );
    Must be: echo apply_filters(‘woocommerce_cart_item_quantity’, $product_quantity, $cart_item_key, $cart_item );

    Tip: Replace original theme file with the updated cart.php with plugin booster. There is a modul to do that.
    So your are update-save.

    Have success.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal Error’ is closed to new replies.