Reputation: 385
I have a separate PHP class called MyClass.php. I need to call a method in that class and send it a variable. This is what I have in functions.php:
function email_submission($entry, $form){
MyClass::addEmail($entry["2"]);
}
//Fatal error: Class 'MyClass' not found in /path/wp-content/themes/mytheme/functions.php
What am I missing?
Upvotes: 0
Views: 1794