Calling a function of a plugin from wordpress theme header file

Question

wp-content/plugins/ultimate-member/includes/core/class-permalinks.php

namespace umcore;
class Permalinks { 
        function __construct() {
            add_action( 'init',  array( &$this, 'activate_account_via_email_link' ), 1 );
        }
}

I want to call this function ‘activate_account_via_email_link’ from wordpress/theme/header.php

My code so far :

$action = new umcorePermalinks;
$action->activate_account_via_email_link();

The error :
Fatal error: Uncaught Error: Class ‘umcorePermalinks’ not found in /home/xyzz/public_html/xyz/wp-content/themes/university/header-frontpage.php:5 Stack trace: #0

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/calling-a-function-of-a-plugin-from-wordpress-theme-header-file/">

Calling a function of a plugin from wordpress theme header file</a>
0
, Div 2 months 0 Answers 74 views 0

Leave an answer