• Resolved Chris

    (@smith42c)


    Hello again,

    I am using a Gift Card system plugin, and we just noticed that checking out with a gift card gives a woocommerce bar alert of “Internal Server Error” in checkout. The order is created just fine, and both the customer and the formatted emails are sent and received, but it does not get to the thank you page. Normal paid orders are working fine, and disabling the kadence plugin makes it work fine as well.

    Found this fatal error in the log. I contacted the gift card plugin developer who said I should contact you. Can I fix this somehow or…? Thanks in advance for any help!

    [25-Feb-2019 08:53:38 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Kadence_Woomail_Designer::add_email_header(), 1 passed in /home/ ……url…….. /public_html/wp-includes/class-wp-hook.php on line 286 and exactly 2 expected in /home/ …….url……. /public_html/wp-content/plugins/kadence-woocommerce-email-designer/kadence-woocommerce-email-designer.php:510
    Stack trace:
    #0 /home/ ……url…….. /public_html/wp-includes/class-wp-hook.php(286): Kadence_Woomail_Designer->add_email_header(‘Welcome to The …’)
    #1 /home/ …………… /public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 /home/ …….url……. /public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /home/ …….url……. /public_html/wp-content/plugins/wcmp-vendor_stock_alert/templates/emails/vendor_out_of_stock_alert_email.php(16): do_action(‘woocommerce_ema…’, ‘Welcome to The …’)
    #4 /home/2 in /home/ …….url……. /public_html/wp-content/plugins/kadence-woocommerce-email-designer/kadence-woocommerce-email-designer.php on line 510

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ben Ritner – Kadence WP

    (@britner)

    Hey,
    Thanks for posting,

    The error states that an argument is missing when do_action( 'woocommerce_email_header' ) runs. This means you have a plugin adding an email template and that template is missing the email object argument when they add the ‘woocommerce_email_header’ action in their template.

    If you look here you can see how woocommerce does it:

    https://github.com/woocommerce/woocommerce/blob/master/templates/emails/customer-completed-order.php#L25

    I suggest just asking the plugin author (looks like it might be “wcmp-vendor_stock_alert” ) to check that their templates have the email object as the second variable when calling ‘woocommerce_email_header’.

    Let me know what they say.

    Ben

    Thread Starter Chris

    (@smith42c)

    Thanks so much for the prompt reply. They were able to fix this quickly. Anyone reading this was not a problem with this plugin like a different dev told me… sorry about that :-/

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