private function locateFile()
    {
        // Try to retrieve the theme file path from child or parent for first.
        // Fallback to Plugin templates path.
        $filePath = locate_template($this->templatesPath, false, false);

        // Looking for the file within the plugin if allowed.
        if (! $filePath) {
            $filePath = $this->defaultPath;
        }

        return $filePath;
    }
private function locateFile()
    {
        // Try to retrieve the theme file path from child or parent for first.
        // Fallback to Plugin templates path.
        $filePath = locate_template($this->templatesPath, false, false);

        // Looking for the file within the plugin if allowed.
        if (! $filePath) {
            $filePath = $this->defaultPath;
        }

        return $filePath;
    }
private function locateFile ( ) { // Try to retrieve the theme file path from child or parent for first. // Fallback to Plugin templates path. $ filePath = locate_template ( $ this -> templatesPath , false , false ) ; // Looking for the file within the plugin if allowed. if ( ! $ filePath ) { $ filePath = $ this -> defaultPath ; } return $ filePath ; }
Locate template file

Locate the file path for the view, hierarchy try to find the file within the child, parent
and last within the plugin.

@uses  locate_template() To locate the view file within the theme (child or parent).

@since 2.1.0

@return string The found file path. Empty string if not found.
Locate template file