The get_plugin_data function may not be returning the correct results in different files because the plugin file being analyzed is not the same in both instances. This function retrieves metadata from the plugin’s header comment block in the plugin file, so if the function is called in a different file, it may not be reading the same plugin file and therefore not returning the correct results. To resolve this, ensure that you are calling the function with the correct path to the plugin file in question.

(Visited 2 times, 1 visits today)
Was this article helpful?
YesNo
Close Search Window