Override plugin class which has namespace
I would like to override this plugin class in child theme :
class-config.php
namespace um;
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! class_exists( 'um\Config' ) ) {
/**
* Class Config
*
* Class with global variables for UM
*
* @package um
*/
class Config
{
//some code here...
}
//end class
}
But as you can see, this class uses a namespace, so I can't just write this in my functions.php :
functions.php
class Config
{
//some new code here...
}
I tried to add namespace um; in functions.php but of course it doesn't work.
Does anybody have an idea ? :)