squashtoppertje

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Check if loggedin user has VAT number verified #134080
    squashtoppertje
    Participant

    Hi,

    So I found out it is stored as a user_meta.

    If anyone else wants to know this, this is my solution:

    global $user;
    $meta_key = ‘billing_eu_vat_number’;
    $user_id = get_current_user_id();
    if ( is_user_logged_in() ) {
    if ( metadata_exists( ‘user’, $user_id, $meta_key ) ) {
    print_r(“Do something!”);
    } else {
    print_r(“Do something else!”);
    }
    }

Viewing 1 post (of 1 total)