I created some usercontact fields with add_filter( ‘user_contactmethods’, myfunction).
In a shortcode function, I access them like this:
$meta = get_user_meta($ID);
/* The following line throws the “Notice: Undefined Index” message. */
$example_var = $meta[‘my-contactmethod’];
If the contact methods were declared, by pop the php Notice?
- The topic ‘contactmethods throws “undefined index”’ is closed to new replies.