• Resolved loganweb

    (@loganweb)


    When I activate the plugin, appear this erros to me and I dont what to do. The functions with errors are relationated with quantity of product I think.

    cart page

    Warning: Missing argument 3 for ppom_woocommerce_control_cart_quantity() in /home/timemaniasports/public_html/wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php on line 593

    checkout page

    Warning: Missing argument 2 for ppom_woocommerce_control_checkout_quantity() in /home/timemaniasports/public_html/wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php on line 666

    Warning: Missing argument 3 for ppom_woocommerce_control_checkout_quantity() in /home/timemaniasports/public_html/wp-content/plugins/woocommerce-product-addon/inc/woocommerce.php on line 666

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    we checked this issue as per info above but we don’t see any problem in our code. Can you please share WooCommerce version you using?

    the issue is related to theme that overwrite the WooCommerce template cart.php, in the file:

    wp-content/themes/YOUR_THEME_NAME/woocommerce/cart/cart.php:

    is caused by the filter “woocommerce_cart_item_quantity” that in some themes missed the third argument:

    echo apply_filters( ‘woocommerce_cart_item_quantity’, $product_quantity, $cart_item_key );

    below the right code:

    echo apply_filters( ‘woocommerce_cart_item_quantity’, $product_quantity, $cart_item_key, $cart_item );

    changing the code like above will fix the issue and the error disappear.

    Thread Starter loganweb

    (@loganweb)

    My code was correct.

    But, I can fix it.

    In the path of plugin > inc > woocommerce.php I change two functions.

    function ppom_woocommerce_control_cart_quantity($quantity, $cart_item="", $cart_item_key="")

    AND

    function ppom_woocommerce_control_checkout_quantity($quantity, $cart_item="", $cart_item_key="")

    I add both functions, in two parameters the =”” in $cart_item and $cart_item_key and the problem was solved.

    It works, Thanks @nmedia

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

The topic ‘Plugin causing WARNING in product/shop page’ is closed to new replies.