Title: Fatal Error  Call to undefined function WC()
Last modified: August 22, 2016

---

# Fatal Error Call to undefined function WC()

 *  Resolved [Maikel1987](https://wordpress.org/support/users/maikel1987/)
 * (@maikel1987)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wc/)
 * When i activate the plugin i get a fatal error:
    Call to undefined function WC()
   on line 180 in woocommerce-pay-for-payment/.admin/class-pay4pay-admin.php
 * I’m using WordPress 3.8 with woocommerce 2.2.3
 * [https://wordpress.org/plugins/woocommerce-pay-for-payment/](https://wordpress.org/plugins/woocommerce-pay-for-payment/)

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

 *  Plugin Contributor [podpirate](https://wordpress.org/support/users/podpirate/)
 * (@podpirate)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wc/#post-5302921)
 * Phew, that’s a strange one…
    The WC() function is called either when Woocommerce
   fires the ‘woocommerce_init’ hook or when the wc settings are saved. This is 
   positively after all woocommerce php (including the WC() function code) has been
   included. The only cause I can think of is another plugin or theme doing a ‘woocommerce_init’
   before the woocommerce plugin has been properly loaded. Are you able to scan 
   the php source in your wp-content/ for the string `do_action( 'woocommerce_init`(
   or even better the regex `do_action\(\s?['"]woocommerce_init`). There should 
   be exactly one match in plugins/woocommerce/woocommerce.php line 399.
 *  [AngeloLazzari](https://wordpress.org/support/users/angelolazzari/)
 * (@angelolazzari)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wc/#post-5303181)
 * Hi, i have the same problem, installing OK, on activation the same error. Woocommerce
   2.0 and WP 4.0
 * Can you help us?
 * Thank you!
    Angelo
 *  Plugin Contributor [podpirate](https://wordpress.org/support/users/podpirate/)
 * (@podpirate)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wc/#post-5303182)
 * Hi Angelo,
    at least wooCommerce 2.1 is required. See plugin description and 
   this thread as well: [https://wordpress.org/support/topic/not-able-to-intall-this-plugin?replies=2](https://wordpress.org/support/topic/not-able-to-intall-this-plugin?replies=2)
 *  [AngeloLazzari](https://wordpress.org/support/users/angelolazzari/)
 * (@angelolazzari)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wc/#post-5303183)
 * ok, thanks!
 * Angelo

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

The topic ‘Fatal Error Call to undefined function WC()’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pay-for-payment/assets/icon-256x256.png?rev=
   2541841)
 * [Pay for Payment for WooCommerce](https://wordpress.org/plugins/woocommerce-pay-for-payment/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pay-for-payment/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pay-for-payment/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pay-for-payment/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pay-for-payment/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pay-for-payment/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [AngeloLazzari](https://wordpress.org/support/users/angelolazzari/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-wc/#post-5303183)
 * Status: resolved