Hi Guys ,
I am simply calling this file –
/functions.php?fcall=update_cats_name'
And in functions.php file , I wrote this code –
$fcall = $_REQUEST['fcall'];
if($fcall && $fcall == 'update_cats_name'){
update_custom_category_name();
}
add_action("wp_ajax_update_custom_category_name", "update_custom_category_name");
function update_custom_category_name(){
$update_result = wp_update_term(25, 'goals-category', array(
'name' => $_POST['value']
));
echo 'done';
exit;
}
But it is throwing this error-
Fatal error: Call to undefined function wp_update_term() in D:wampwwwprojectsSGTwordpresswp-contentthemessgtfunctions.php on line 41
Please help me to solve this .
Thanks