Last active
September 12, 2019 12:34
-
-
Save FullStackAlex/d3f28cf3da52f5d343de2e37dd992ed5 to your computer and use it in GitHub Desktop.
Use class method in WordPress action hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once( get_template_directory() . "/path/to/OtherClass.php" ); | |
use Namespace\OfThe\OtherClass; | |
(...) | |
'callback' => 'OtherClass::SomeStaticMethod' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment