[Solved] Deprecated: Function create_function() is deprecated in our-team-by-woothemes

4
(1.3K Views)

×

Please Login or Register to process.

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 the best solution. How to fix it? please solve my problem. I want to create an eCommerce website on WordPress. 

asked 14 Sep 2019 in Wordpress by vishalrana1(7.3K Points)

Share

3 Answers
answered 14 Sep 2019 by shakti(9.1K Points) (edited)
4

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 . 


Comment
Your information is correct. I fixed it. Thank you.
commented 14 Sep 2019 by vishalrana1

answered 14 Sep 2019 by rajatmehra4005(960 Points)
3

The error "Deprecated: Function create_function() is deprecated" is looking at the 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 a text editor. 

3. Go to 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 


Comment
Oh ! great, It works perfectly.
commented 14 Sep 2019 by vishalrana1

answered 14 Sep 2019 by priyasharma4005(4.1K Points)
1

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. 


Comment

Related Questions :-

Your Answer

You can post your answer after login..