Title: Renaming plugin function &#8211; still calls old function
Last modified: August 19, 2016

---

# Renaming plugin function – still calls old function

 *  [dyrk](https://wordpress.org/support/users/dyrk/)
 * (@dyrk)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/renaming-plugin-function-still-calls-old-function/)
 * Hi
 * I’ve built a custom plugin. I’m using the following to add a submenu.
 *     ```
       function menu_items() {
       	add_submenu_page('whatever','Whatever Admin', 'Whatever Admin', 'manage_options', 'whatever', 'whatever_admin');
       }
       ```
   
 * The function whatever_admin used to be called something else. I renamed the function
   and now when I click the link in admin – it’s still trying to find the old function
   though I can’t find any reference to it anywhere.
 * `call_user_func_array() expects parameter 1 to be a valid callback, function '
   old_function' not found or invalid function name`
 * How is this possible? and how can I resolve it?
 * Thanks in advance

Viewing 1 replies (of 1 total)

 *  Thread Starter [dyrk](https://wordpress.org/support/users/dyrk/)
 * (@dyrk)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/renaming-plugin-function-still-calls-old-function/#post-2049051)
 * Found reference to it. uncommented line which should have been commented.
    Ignore
   question.
 * Though I must say…Wordpress’s admin menus are very frustrating.

Viewing 1 replies (of 1 total)

The topic ‘Renaming plugin function – still calls old function’ is closed to new
replies.

## Tags

 * [admin-panel](https://wordpress.org/support/topic-tag/admin-panel/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)

 * 1 reply
 * 1 participant
 * Last reply from: [dyrk](https://wordpress.org/support/users/dyrk/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/renaming-plugin-function-still-calls-old-function/#post-2049051)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
