Title: Function create_function() is deprecated
Last modified: March 13, 2019

---

# Function create_function() is deprecated

 *  [olstadesigns](https://wordpress.org/support/users/olstadesigns/)
 * (@olstadesigns)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-15/)
 * Hi,
 * I am running PHP7.2 and have a Function create_function() is deprecated error
 *     ```
       if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { 
   
       	add_action( 'plugins_loaded', create_function( '', '
       			$filename  = "include/";
       			$filename .= is_admin() ? "backend.inc.php" : "frontend.inc.php";
       			if( file_exists( plugin_dir_path( __FILE__ ) . $filename ) )
       				include( plugin_dir_path( __FILE__ ) . $filename );
       		' 	)
       	);
       ```
   
 * what do I need to do to this piece of code to change the create_function to make
   it compatable in the file woocommerce-menu-extension.php?

Viewing 1 replies (of 1 total)

 *  Thread Starter [olstadesigns](https://wordpress.org/support/users/olstadesigns/)
 * (@olstadesigns)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-15/#post-11327964)
 * Is there any support for this plugin or am I better off trying to find another
   one. I have no response here and I also emailed the plugin author and have no
   response? Strange thing is this plugin was only updated 1 month ago so would 
   have thought there would be some support or at least a response? I see alot of
   tickets have not been responded to.

Viewing 1 replies (of 1 total)

The topic ‘Function create_function() is deprecated’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-menu-extension_262626.
   svg)
 * [WooCommerce Menu Extension](https://wordpress.org/plugins/woocommerce-menu-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-menu-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-menu-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-menu-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-menu-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-menu-extension/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [olstadesigns](https://wordpress.org/support/users/olstadesigns/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/function-create_function-is-deprecated-15/#post-11327964)
 * Status: not resolved