• Resolved pedrtosimao

    (@pedrtosimao)


    Hi,

    I’m getting this error when canceling a order with Cost of Goods for WooCommerce and Woo Custom Emails plugins active.
    If I disable Cost of Goods for WooCommerce the error does not occur.

    Uncaught ArgumentCountError: Too few arguments to function Alg_WC_Cost_of_Goods_Orders::woocommerce_email_order_meta(), 2 passed in /var/www/vhosts/***/httpdocs/wp-includes/class-wp-hook.php on line 303 and exactly 3 expected in /var/www/vhosts/***/httpdocs/wp-content/plugins/cost-of-goods-for-woocommerce/includes/class-alg-wc-cog-orders.php:210
    Stack trace:
    #0 /var/www/vhosts/***/httpdocs/wp-includes/class-wp-hook.php(303): Alg_WC_Cost_of_Goods_Orders->woocommerce_email_order_meta()
    #1 /var/www/vhosts/***/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #2 /var/www/vhosts/***/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
    #3 /var/www/vhosts/***/httpdocs/wp-content/plugins/woo-custom-emails/admin/class-wcemails-instance.php(248): do_action()
    #4 /var/www/vhosts/aviate.pt/httpdocs/wp-content/plugins/woo-custom-emails/admin/class-wcemails-instance.php(223): WCEmails_Instance->woocommerce_email_order_meta()
    #5 /var/www/vhosts/aviate.pt/httpdocs/

    Any ideas why?

    Thanks,

Viewing 1 replies (of 1 total)
  • Plugin Contributor Pablo Pacheco

    (@karzin)

    Hi @pedrtosimao ,

    It seems that the Woo Custom Emails plugin is not triggering the woocommerce_email_order_meta hook with the proper parameters.

    Anyway, don’t worry. I’ll fix this compatibility issue it on the next version.
    Meanwhile you can simply disable the option Orders > Orders emails > Admin new order email and you won’t see the error anymore.

Viewing 1 replies (of 1 total)
  • The topic ‘Uncaught ArgumentCountError’ is closed to new replies.