Fatal error: Cannot access protected property Some_Plugin::$_some_property
What is the best/least-destructive way of accessing a protected property attached to a post.
The property is being affixed to the post by a plugin but I need to access it's stored information to display.
The options I can think of are:
- Altering the plug-in code. I'm not so familiar with Object Oriented PHP so I hesitate to do this to avoid damaging the functionality.
- Somehow invoke the plug-in so I'm in the correct context to retrieve the information (possibly with function in functions.php)
- Write a function which hooks to the publishing of this post type and duplicates the information to a new, non-protected property of the post.
Does anyone have any suggestions or code samples illustrating the best way to go about this. If you need more information just comment and I'll update the question.