I created a plugin to override a theme's function. As I learn that function in plugin loads first but I got an error
Fatal error: Cannot redeclare wooc_extra_register_fields() (previously declared in ****/themes/****/functions.php:247) in ***/plugins/custom-plugin/custom-plugin.php on line 89
Not sure what I am doing wrong. Also put theme's functions need to be override in if !function exist. So what is the right way to override a theme function wrap in !function exist using a plugin??