Ken

USA

designerken.com

Age: 43

Trying to learn PHP and WP

Mar
6
awarded Tumbleweed
Feb
27
asked How to get array of product categories in woocommerce admin settings area
Dec
31
accepted How to get private property in parent class into extended class?
Dec
30
revised How to get private property in parent class into extended class?
added 176 characters in body
Dec
30
revised access private variable in subclass
Updated to let community know that the developer was changing their original code.
Dec
30
comment How to get private property in parent class into extended class?
I have also decided based off the properties being private to just extend the class and re-use the entire class and adjust the picker() method to suite my needs.
Dec
30
comment How to get private property in parent class into extended class?
I changed the title to reflect better what was happening.
Dec
30
revised How to get private property in parent class into extended class?
edited title
Dec
30
comment access private variable in subclass
@prodigitalson - in regards to going in and out of PHP, would you recommend echoing the HTML portions or is there another/better way to do it?
Dec
30
awarded Commentator
Dec
30
comment access private variable in subclass
thanks for the suggestion, I will have to look into this more as its completely out of my wheelhouse. I assume I would create 2 reflections, based on the 4 private properties? Would your suggestion go inside my extended class but before the picker() method?
Dec
30
comment access private variable in subclass
@Gohn67 yup, thought of that too, but didn't want to have to maintain it if there are updates to that class in the future. #lazy
Dec
30
comment access private variable in subclass
@Gohn67 agreed but unfortunately it's not my class, hence not being able to change the parent class. I did put a call out to the developer to see if he would change to protected but I have not heard back so trying to find an alternate workaround.
Dec
30
asked access private variable in subclass
Dec
29
comment How to get private property in parent class into extended class?
As a little experiment I changed the attributes private to protected and they appeared on the page correctly. Now I need to figure out how to achieve this without editing the core plug-in or if it is even possible.
Dec
29
awarded Commentator
Dec
29
comment How to get private property in parent class into extended class?
This is quickly spiraling out of my wheelhouse. How would I find out if there are getter methods? I created a paste of the original class here. pastebin.com/EWCn7UCX
Dec
29
comment How to get private property in parent class into extended class?
Yup I looked at the class I'm extending, it has that set to private. So is there nothing I can do then? Would proving the superclass code be beneficial at this point?
Dec
29
asked How to get private property in parent class into extended class?
Nov
13
awarded Popular Question
1 2 3 4