Title: Cannot instantiate abstract class Twig_Function
Last modified: July 20, 2018

---

# Cannot instantiate abstract class Twig_Function

 *  Resolved [bbfreelance](https://wordpress.org/support/users/bbfreelance/)
 * (@bbfreelance)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/)
 * Hy,
 * I have an error when installing your plugin :
    Cannot instantiate abstract class
   Twig_Function in …./wp-includes/functions.php on line 330 I’m using Timber but
   I already deactivated it and reinstalled your plugin with the same result. I 
   think your Twig version should be updated (composer.json not found in your theme).
   PHP version : 7.0

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

 *  Thread Starter [bbfreelance](https://wordpress.org/support/users/bbfreelance/)
 * (@bbfreelance)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/#post-10510970)
 * I confirm that it works with Twig v2.5.0
 *  [George Botsev](https://wordpress.org/support/users/botzev/)
 * (@botzev)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/#post-10511350)
 * Hello!
    Can you give more details about the problem? How can be reproduced? Twig
   version is fixed in our plugin in order to be compatible with older PHP versions.
   This is actually limitation from the Twig library itself and not from us.
 *  Thread Starter [bbfreelance](https://wordpress.org/support/users/bbfreelance/)
 * (@bbfreelance)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/#post-10511853)
 * Well, I’m using latest version of WordPress and Woocormerce, my php version is
   7.0 . When I activate your plugin this fatal error appeared.
    To fix it I just
   replaced your twig vendor with a more recent one : v2.0.5 (it would be nice to
   let your composer.json in your plugin to be aware of the version and chang it
   more easily)… so it does not solved the next update.
 *  [George Botsev](https://wordpress.org/support/users/botzev/)
 * (@botzev)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/#post-10512091)
 * We are using Twig library version 1.32 as far as I know.
 * I was unable to reproduce the fatal error that you have reported.
    Could you 
   provide more information, of course, if you wish to pursue further this issue?
 *  Thread Starter [bbfreelance](https://wordpress.org/support/users/bbfreelance/)
 * (@bbfreelance)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/#post-10512858)
 * Well thanks for your help but I don’t know what I can provide for more. I was
   able to solve this issue fixing twig version so it’s ok.

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

The topic ‘Cannot instantiate abstract class Twig_Function’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-multilingual/assets/icon-256x256.png?rev=2937122)
 * [WPML Multilingual & Multicurrency for WooCommerce](https://wordpress.org/plugins/woocommerce-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-multilingual/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [bbfreelance](https://wordpress.org/support/users/bbfreelance/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/cannot-instantiate-abstract-class-twig_function/#post-10512858)
 * Status: resolved