strangerstudios / pmpro-register-helper

A robust plugin to collect additional fields for WordPress users. Fields can be collected at membership checkout, on the user's profile or for administrative view-only.
https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
29 stars 41 forks source link

How to access custom fields in PHP #208

Open jezaman opened 3 years ago

jezaman commented 3 years ago

Can you please add a very basic example on how to actually use custom fields? Very basic info is missing.. like where are the fields even stored and how are they accessed? I did a var_dump of get_userdata and get_user_meta and i can't even find the fields i added?

devdarren7 commented 3 years ago

` <?php $weight = get_user_meta( $current_user->ID, '*',true);

echo '

'; echo '

'; $prefixes = 'Week_'; $meta = get_user_meta( $current_user->ID ); echo ''; ?>`
devdarren7 commented 3 years ago

I still cant loop through nicely in PHP but i dumped it with js and worked it from there