Title: Fatal Error
Last modified: February 26, 2019

---

# Fatal Error

 *  Resolved [Chris](https://wordpress.org/support/users/smith42c/)
 * (@smith42c)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-3141/)
 * 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 Contributor [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-3141/#post-11248472)
 * 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](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](https://wordpress.org/support/users/smith42c/)
 * (@smith42c)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-3141/#post-11261833)
 * 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.

 * ![](https://ps.w.org/kadence-woocommerce-email-designer/assets/icon-256x256.png?
   rev=3115863)
 * [Kadence WooCommerce Email Designer](https://wordpress.org/plugins/kadence-woocommerce-email-designer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kadence-woocommerce-email-designer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/)
 * [Active Topics](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kadence-woocommerce-email-designer/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Chris](https://wordpress.org/support/users/smith42c/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-3141/#post-11261833)
 * Status: resolved