Title: Problem with OOP in plugin
Last modified: August 19, 2016

---

# Problem with OOP in plugin

 *  [Nero12](https://wordpress.org/support/users/nero12/)
 * (@nero12)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/problem-with-oop-in-plugin/)
 * Hi i have strange problem.
    I have in my plugin some classes. Like CWP, CWP_DB,
   CWP_USER etc. when im using them i write for example:
 *     ```
       register_activation_hook(__FILE__,"CWP::activate");
       register_deactivation_hook(__FILE__,"CWP::deactivate");
       ```
   
 * In localhost everything is ok. But when i run it on server in internet i get 
   errors like:
 * `Warning: call_user_func_array() [function.call-user-func-array]: First argument
   is expected to be a valid callback, 'CWP::deactivate' was given in /home/tci/
   ftp/wordpress/wp-includes/plugin.php on line 339`
 * Neverming what is in class methods. It can be blank function.
    sry for English.

The topic ‘Problem with OOP in plugin’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [Nero12](https://wordpress.org/support/users/nero12/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/problem-with-oop-in-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
