• Resolved Martin

    (@swdmedialimited)


    Hi,

    Is it possible to allow users to edit a field stored within a different table in the database.

    I understand the plugin gives access to fields stored in User Meta, however I need to allow users to edit their PayPal email address that is stored within another table relating to an Affiliate Plugin.

    For example table affiliate_wp_affiliates >>> payment_email

    Is there a way I can add a custom field on the backend?

Viewing 1 replies (of 1 total)
  • Plugin Author Georgian Cocora

    (@raster02)

    Hello @swdmedialimited,

    In order for this to work you will require some custom code.

    First, make a custom field in Profile Builder representing this affiliate payment email (PB will store this in usermeta as well, but that shouldn’t be an issue).

    Then use some code to modify this field in the affiliate wp plugin:

    add_action( 'wppb_edit_profile_success', 'wppbc_custom_code', 20, 3 );
    function wppbc_custom_code( $field_data, $form_name, $user_id ){
    	// custom code
    }

    This will trigger each time an edit profile form is submitted, you can look inside $field_data for your field value and then you just need to figure out a way to update the affiliate data. But that’s a question for their support channels.

    Regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Edit Profile, Mapping Fields’ is closed to new replies.