• Register
Welcome to Techno Smarter QA, Questions, Answers Community
+3 votes
18 views

Error is the restriction of process. I have installed a theme. I am getting an error Deprecated: Function create_function() is deprecated in C:\xampp\htdocs\wordpress\wp-content\plugins\our-team-by-woothemes\classes\class-woothemes-widget-our-team.php on line 324 . 

I don't know about this error, I tried many solutions and searched on google but did not get any best solution. How to fix it? please solve my problem. I want to create an eCommerce website on Wordpress. 

in Wordpress by (4.4k points) 4 14 44

3 Answers

+4 votes

Thanks for posting here. I have fixed may error like  Deprecated: Function create_function() is deprecated in class-woothemes-widget-our-team.php on line 324.   

The error is showing that function create_function() depreciated. I have the best solution for you. Just follow that. You will able to solve this Deprecated: Function create_function() problem. 

1. First of all, go to localhost C:\xampp\htdocs\wordpress folder. Here, you will get the wp-config.php file. 

2. Edit wp-config.php file. You can use any editor to edit a PHP file.

3. Now find out the WP_DEBUG   line code. The code is define( 'WP_DEBUG', true );     . 

4. Now change define( 'WP_DEBUG', true );  to define( 'WP_DEBUG', false ); . 

Save the wp-config.php file and reload the page.

This question is related to 

https://technosmarter.com/qa/317/fixed-warning-continue-targeting-switch-equivalent-break-mean-continue

It will help you on the live server and localhost xampp .  The error  Deprecated: Function create_function() is deprecated in C:\xampp\htdocs\wordpress\wp-content\plugins\our-team-by-woothemes\classes\class-woothemes-widget-our-team.php on line 324 will be removed . 

by (6.3k points) 3 20 43
Your information is correct. I fixed it. Thank you.
+3 votes

The  error "Deprecated: Function create_function() is deprecated" is looking with latest version 7 . You should try with the old version of PHP. 

I have another solution to remove this PHP deprecated error from class-woothemes-widget-our-team.php on line 324.

Follow the steps - 

1.  First of all, go to this path C:\xampp\htdocs\wordpress\wp-content\plugins\our-team-by-woothemes\classes\class-woothemes-widget-our-team.php , if you are on live server then follow the path public_html\wp-content\plugins\our-team-by-woothemes\classes\class-woothemes-widget-our-team.php 

2. Edit class-woothemes-widget-our-team.php file with text editor . 

3. Go to the line 324. 

4. You will fount this code - 

add_action( 'widgets_init', create_function( '', 'return register_widget("Woothemes_Widget_Our_Team");' ), 1 );

Change this line code to - 

//add_action( 'widgets_init', create_function( '', 'return register_widget("Woothemes_Widget_Our_Team");' ), 1 );

Save the file and reload the page . The error  "Deprecated: Function create_function() is deprecated in C:\xampp\htdocs\wordpress\wp-content\plugins\our-team-by-woothemes\classes\class-woothemes-widget-our-team.php on line 324 " will be removed 

by (1.2k points) 5 10
Oh ! great, It works perfectly.
+1 vote

The error Deprecated: Function create_function() is deprecated is restriction of development .The means of deprecated that it will be removed in the future. So understand the PHP7 concepts. PHP 7 is launched. You should understand term deprecated in PHP 7. Change the function like _construct(). You need to use function  _myFucntion(). 

https://technosmarter.com/qa/143/deprecated-methods-with-their-class-will-constructors-future-version

 I have tried this and solved may problems. 

by (2.9k points) 1 10 33
...