Skip to main content
updated code formatting.
Source Link
Shazzad
  • 3.3k
  • 1
  • 17
  • 23

this is working for me

if ( metadata_exists( 'user', $user_id, $meta_key ) ) { print_r("Exists"); }else{ print_r("Not Exists"); }

if ( metadata_exists( 'user', $user_id, $meta_key ) ) {
    print_r("Exists");
} else {
    print_r("Not Exists");
}

this is working for me

if ( metadata_exists( 'user', $user_id, $meta_key ) ) { print_r("Exists"); }else{ print_r("Not Exists"); }

this is working for me

if ( metadata_exists( 'user', $user_id, $meta_key ) ) {
    print_r("Exists");
} else {
    print_r("Not Exists");
}
Source Link

this is working for me

if ( metadata_exists( 'user', $user_id, $meta_key ) ) { print_r("Exists"); }else{ print_r("Not Exists"); }