• Resolved igorneumann

    (@igorneumann)


    Hello, we are trying (and fauiling) to copy the value of an extra field into a variable…

    We use to do this way:
    $current_user = wp_get_current_user();
    $userprice = $current_user->billing_address_2;

    But changing to a profile extra field doesnt work:

    $current_user = wp_get_current_user();
    $userprice = $current_user->prflxtrflds_user_field_value[1];

    Any other way to get this value in php? (shortcode will not work)

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    This functionality is not available. We will consider it, and if we deem it necessary, we will make the necessary changes to the plugin.

    Thread Starter igorneumann

    (@igorneumann)

    Ok, for anyone looking for the same, we found 2 different solutions for this.

    Solution 1: Use shortcode.
    $variable = do_shortcode(‘[prflxtrflds_field field_id=1]’);

    Solution 2: Use wordpress function.
    $variable = prflxtrflds_user_data.user_id->get_current_user();

    Hi,

    We are glad that you have found the solution. We consider this topic as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Any way to copy a field to a variable_’ is closed to new replies.