Vote count:
0
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 $currentuser
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
It didn't insert anything into the database. Any help would be greatly appreciated.
asked 1 min ago
PHP - getting data from multidimensional array with objects
Aucun commentaire:
Enregistrer un commentaire