Title: Deprecated Code &#8211; PHP Fatal Error
Last modified: October 25, 2019

---

# Deprecated Code – PHP Fatal Error

 *  Resolved [jebanks](https://wordpress.org/support/users/jebanks/)
 * (@jebanks)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-php-fatal-error/)
 * Good Morning,
 * I am writing to address the following issue we are having with the Kadence WooCommerce
   Email Designer. To briefly summarize, we were having an issue with emails being
   sent successfully using the WooCommerce Save & Share Cart. Upon performing a 
   trace using IIS, the following as discovered:
 * [23-Oct-2019 19:32:45 UTC] The WC_Cart::get_remove_url function is deprecated
   since version 3.3. Replace with wc_get_cart_remove_url.
    [23-Oct-2019 19:32:45
   UTC] The WC_Cart::get_item_data function is deprecated since version 3.3. Replace
   with wc_get_formatted_cart_item_data. [23-Oct-2019 19:32:45 UTC] PHP Fatal error:
   Uncaught ArgumentCountError: Too few arguments to function Kadence_Woomail_Designer::
   add_email_header(), 1 passed in C:\inetpub\wwwroot\Carriers\wp-includes\class-
   wp-hook.php on line 286 and exactly 2 expected in C:\inetpub\wwwroot\Carriers\
   wp-content\plugins\kadence-woocommerce-email-designer\kadence-woocommerce-email-
   designer.php:560 Stack trace: #0 C:\inetpub\wwwroot\Carriers\wp-includes\class-
   wp-hook.php(286): Kadence_Woomail_Designer->add_email_header(‘ ‘) #1 C:\inetpub\
   wwwroot\Carriers\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters(”,
   Array) #2 C:\inetpub\wwwroot\Carriers\wp-includes\plugin.php(453): WP_Hook->do_action(
   Array) #3 C:\inetpub\wwwroot\Carriers\wp-content\plugins\woocommerce-email-cart\
   email-cart.php(1118): do_action(‘woocommerce_ema…’, ‘ ‘) #4 C:\inetpub\wwwroot\
   Carriers\wp-content\plugins\woocommerce-email-cart\email-cart.php(303): WC_Email_Cart-
   >format_email(‘<style>\t\t\r\n\t\t/*…’, ‘ ‘) #5 C:\inetpub\wwwroot\Carriers\wp-
   content\plugins\woocommerce-email-c in C:\inetpub\wwwroot\Carriers\wp-content\
   plugins\kadence-woocommerce-email-designer\kadence-woocommerce-email-designer.
   php on line 560
 * At that point, once I disabled your plugin, the Save & Share Cart Email functionality
   is now working as expected. Can you please take a look at this when you have 
   an opportunity? We have all of your templates built using your plugin – it would
   be very beneficial time wise if we can this corrected.
 * Thank you,
    Jake Ebanks Actsoft, Inc. Business Intelligence Analyst

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

 *  Plugin Contributor [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-php-fatal-error/#post-12065627)
 * Hey,
    This is an issue with your WooCommerce Save & Share Cart plugin. There 
   is nothing we can do on our end. They have to update to follow WooCommerce standards
   for email.
 * All calls to the action ‘woocommerce_email_header’ are supposed to include 2 
   variables. For example look here: [https://github.com/woocommerce/woocommerce/blob/master/templates/emails/customer-processing-order.php#L25](https://github.com/woocommerce/woocommerce/blob/master/templates/emails/customer-processing-order.php#L25)
 * Your error is saying that the template: woocommerce-email-cart\email-cart.php
   is missing the second variable.
 * Ben
 * You need to contact the plugin author and ask them to update.
 *  Thread Starter [jebanks](https://wordpress.org/support/users/jebanks/)
 * (@jebanks)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-php-fatal-error/#post-12080003)
 * Hi Ben,
 * Thank you for your response & details; this gave me exactly what I needed to 
   resolve the issue. For REF, I had to modify the following values within the email-
   cart.php:
 * The following code:
    do_action( ‘woocommerce_email_header’, $heading ); echo 
   $message; do_action( ‘woocommerce_email_footer’ );
 * had to be updated to:
    do_action( ‘woocommerce_email_header’, $email_heading,
   $email ); echo $message; do_action( ‘woocommerce_email_footer’, $email );
 * I’ll notify the author about the error and the above details.
 * Best Regards,
    Jake
 *  Plugin Contributor [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-php-fatal-error/#post-12081739)
 * Hey,
    Just so you know, you probably shouldn’t change `$heading` to `$email_headeing`
 * If `$heading` is the variable set by the plugin it should stay.
 * Ben
 *  Thread Starter [jebanks](https://wordpress.org/support/users/jebanks/)
 * (@jebanks)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-php-fatal-error/#post-12083911)
 * Hi Ben,
 * Thank you for sharing your knowledge and experience with me; I updated the email-
   cart.php as you outlined, and email is working as expected. Very much appreciate
   it.
 * Jake

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

The topic ‘Deprecated Code – PHP 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/)

## Tags

 * [PHP Fatal error](https://wordpress.org/support/topic-tag/php-fatal-error/)

 * 4 replies
 * 2 participants
 * Last reply from: [jebanks](https://wordpress.org/support/users/jebanks/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/deprecated-code-php-fatal-error/#post-12083911)
 * Status: resolved