• Hi,
    something wrong when i add a gift card,
    critical error appear just after add to cart.
    Debug :
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Cartflows_Wd_Flow_Actions::redirect_to_next_flow_step(), 1 passed in /home/clients/937672ca9e6a47aedc7e6479081b7932/sites/mademoisellefani.fr/wp-includes/class-wp-hook.php on line 303 and exactly 2 expected in /home/clients/937672ca9e6a47aedc7e6479081b7932/sites/mademoisellefani.fr/wp-content/plugins/cartflows/modules/woo-dynamic-flow/classes/class-cartflows-wd-flow-actions.php:105 Stack trace: #0 /home/clients/937672ca9e6a47aedc7e6479081b7932/sites/mademoisellefani.fr/wp-includes/class-wp-hook.php(303): Cartflows_Wd_Flow_Actions->redirect_to_next_flow_step('') #1 /home/clients/937672ca9e6a47aedc7e6479081b7932/sites/mademoisellefani.fr/wp-includes/plugin.php(189): WP_Hook->apply_filters('', Array) #2 /home/clients/937672ca9e6a47aedc7e6479081b7932/sites/mademoisellefani.fr/wp-content/plugins/yith-woocommerce-gift-cards/lib/class-yith-ywgc-cart-checkout.php(783): apply_filters('woocommerce_add...', '') #3 /home/clients/937672ca9e6a47aedc7e6479081b7932/s in /home/clients/937672ca9e6a47aedc7e6479081b7932/sites/mademoisellefani.fr/wp-content/plugins/cartflows/modules/woo-dynamic-flow/classes/class-cartflows-wd-flow-actions.php on line 105

    Thanks for your help.
    Best regard

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Quick fix until author fix this issue

    edit lib/class-yith-ywgc-cart-checkout.php this file in the plugin and look for $url = apply_filters( 'woocommerce_add_to_cart_redirect', $url ); line.

    then before this line add this line $adding_to_cart = wc_get_product( $product_id );
    after then replace $url = apply_filters( 'woocommerce_add_to_cart_redirect', $url ); with

    $url = apply_filters( 'woocommerce_add_to_cart_redirect', $url, $adding_to_cart );

    this will solve the error.

    Hello there,
    We hope you are doing well!

    We see in the error a log related to the plugin “cartflows”.

    Maybe exists some problem with the interaction between the plugins

    Could you check if the problem persists if you change the theme to the default one from WordPress and deactivate all the plugins except WooCommerce and our plugin?

    Let us know any news, please.

    Have a nice day!

    Thread Starter lauragaona88

    (@lauragaona88)

    @vijayhardaha Thanks a lot it work perfectly !
    @silverd Hope you will fix this issue on the next update.

    Have a nice day !
    and thanks again 😉

    @lauragaona88 Your welcome.

    @silverd This problem is not from “cartflows”, as I explained in the solution above, You’ll see you’re only passing 1 argument in the filter but originally woocommerce pass 2 arguments and you should also pass the 2nd argument as I explained above to solve this issue.

    Thanks

    Hello there,

    @vijayhardaha thanks for your answer.

    In the next version the problem will be fixed.

    Have a nice day!

    • This reply was modified 4 years, 6 months ago by Carlos Arvelo.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Critical error’ is closed to new replies.