I have a problem modifying one of WP plugins, I need to insert some data from an object into a MySQL table, but I have troubles with pulling it out of an object array
Here is a piece of var_export of $current_user
WP_User::__set_state(array(
'data' =>
stdClass::__set_state(array(
'ID' => '1',
'membership_level' =>
stdClass::__set_state(array(
'ID' => '2',
I've tried to do it myself, but I lack knowledge on objective PHP, here is what I tried:
$current_user->WP_User->data->ID
$current_user->WP_User->data->membership_level->ID
Echoing it doesn't show anything
$current_user->data->ID
. – Ja͢ck Feb 18 at 1:18$current_user
object. Thanks guys, I've been struggling on this for an hour believe it or not :P Jack you may want to post it as an answer, as it was exactly what was wrong. – Mateusz Bartkowski Feb 18 at 1:27