Title: Fatal error when adding payment gateway
Last modified: October 31, 2016

---

# Fatal error when adding payment gateway

 *  [klauvi](https://wordpress.org/support/users/klauvi/)
 * (@klauvi)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-adding-payment-gateway/)
 * Hello
    After adding and enabling a payment gateway plugin I got a fatal error
   because both storefront template and plugin were declaring the same function.
   The plugin does check if that function is already declared, but that check is
   missing from storefront theme, and because the plugin is loaded first I get a
   fatal error. Can you please add a check to see if this function is declared to
   the storefront theme?
 * [27-Oct-2016 21:41:18 UTC] PHP Fatal error: Cannot redeclare is_woocommerce_activated()(
   previously declared in /wp-content/plugins/woocommerce-korta/Korta/classes/mg-
   includes/mg-functions.php:12) in /wp-content/themes/storefront/inc/storefront-
   functions.php on line 13
 * They have the following line before declaring the function but it’s missing from
   the storefront theme code:
    if ( ! function_exists( ‘is_woocommerce_activated’))
 * thanks
    Finnur

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

 *  [Dat Hoang](https://wordpress.org/support/users/htdat/)
 * (@htdat)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-adding-payment-gateway/#post-8383343)
 * For this, I think you might call them at [https://github.com/woocommerce/storefront](https://github.com/woocommerce/storefront)
 * P/s: I’m not working at WooCommerce/Automattic.
 *  [James Koster](https://wordpress.org/support/users/jameskoster/)
 * (@jameskoster)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-adding-payment-gateway/#post-8414999)
 * Hey, always best to post stuff like this on github at Dat Hoang suggested. I’ll
   fix this for the next update though.
 *  Thread Starter [klauvi](https://wordpress.org/support/users/klauvi/)
 * (@klauvi)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-adding-payment-gateway/#post-8418569)
 * Thank you very much James!

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

The topic ‘Fatal error when adding payment gateway’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/storefront/4.6.2/screenshot.png)
 * Storefront
 * [Support Threads](https://wordpress.org/support/theme/storefront/)
 * [Active Topics](https://wordpress.org/support/theme/storefront/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/storefront/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/storefront/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [klauvi](https://wordpress.org/support/users/klauvi/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-when-adding-payment-gateway/#post-8418569)
 * Status: not resolved