Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lkarchner

    Are you using the UM Profile tabs extension? If so, please contact us via our website so we can assist you further as we cannot provide support for premium extensions in the free support forum.

    Regards,

    Thread Starter lkarchner

    (@lkarchner)

    Hi, Champ!

    No, I’m not using the tabs extension. I don’t have the form set up inside of a tab, but rather as a shortcode in the profile form:

    https://www.dropbox.com/s/ljn56m81gngkm7e/hs_cf7.png?dl=0

    You can see it here:

    https://hillmanscholars.org/scholar-profile/lindsay-michael/

    Thank you!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lkarchner

    You need to customize the CF7 to auto populate the Email. You can try this code snippets in your theme’s function.php file or Code Snippet plugin to test it:

    add_filter( 'wpcf7_form_hidden_fields', 'um_020821_add_profile_id_on_cf7'  );
    function um_020821_add_profile_id_on_cf7( ){
        if ( class_exists( '\WPCF7_Submission' ) ) {
    	$submission = \WPCF7_Submission::get_instance();
    	$page = $submission->get_meta( 'container_post_id' );
    
    	if ( intval( UM()->options()->get( 'core_user' ) ) == intval( $page ) ) {
    		if ( ! empty( $_REQUEST['_wpcf7_um_profile_id'] ) ) {
    			$user = get_user_by( 'ID', absint( $_REQUEST['_wpcf7_um_profile_id'] ) );
    			if ( ! is_wp_error( $user ) && isset( $user->user_email ) && is_email( $user->user_email ) ) {
    						$args['recipient'] = $user->user_email;
    			}
    		}
    	}
        }
    
        return $args;
    }
    
    add_filter( 'wpcf7_mail_components',  'um_020821_change_email_to_profile_owner_email', 10, 3 );
    function um_020821_add_profile_id_on_cf7(){
         if ( um_is_core_page( 'user' ) ) {
    	 $fields['_wpcf7_um_profile_id'] = um_profile_id();
         }
       return $fields;
    }
    
    
    Thread Starter lkarchner

    (@lkarchner)

    Thanks so much for this snippet! I’m getting an error when I insert it into the functions.php file:

    https://www.dropbox.com/s/breezgwcsl5i2z3/cf7_error.png?dl=0

    Thanks again!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lkarchner

    Please try copying the code snippets from this link:
    https://gist.github.com/champsupertramp/0e7175e46a5100cd948368b1c1cbfe1d

    Regards,

    Thread Starter lkarchner

    (@lkarchner)

    I’m still getting an error (a different one):

    https://www.dropbox.com/s/6avogt17tnvn67r/cf7_error_2.png?dl=0

    On your github link it says “Ultimate Member Profile Tabs with Contact Form 7.” I’m not using profile tabs – the form is placed on the page using a shortcode module in the form. This may be affecting the snippet.

    Thank you for your help! ??

    Thread Starter lkarchner

    (@lkarchner)

    Hi, Champ!

    I wanted to follow up on this item to see if we can get a solution in place. Let me know if I need to switch to paid support (I purchased User Tags, but this issue didn’t fall under that extension so I wasn’t sure if I should post here or on paid support).

    Let me know what you need from me to move forward.

    Thank you!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @lkarchner

    Sorry for the late response.

    Could you please try this updated code in the link and see if this will send an email to the current viewing profile’s email address?

    https://gist.github.com/champsupertramp/0e7175e46a5100cd948368b1c1cbfe1d

    Regards,

    Thread Starter lkarchner

    (@lkarchner)

    Hey, Champ!

    That didn’t work. When I click the submit button the little arrows just keep spinning and the email isn’t sent.

    I also now have another issue. I inserted the user email address field on the member profile form so they can update their email address, but the field won’t show up in edit mode (I don’t want it to be public).

    I’m happy to pay you for this assistance! I don’t expect free work. I would just rather have you guys do it since you wrote the plugin. You will always know it better than anyone else and will write the best code for it.

    I can provide a login if you will give me an email address. You can submit it here on my site if you like: https://pointeradvertising.com/

    Thank you again for your help! ??

    Plugin Contributor Champ Camba

    (@champsupertramp)

    The issue has been resolved with the code snippet in the link:
    https://gist.github.com/champsupertramp/0e7175e46a5100cd948368b1c1cbfe1d

    I am closing this thread now.

    Regards,

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘CF7 Not Sending Emails to Members’ is closed to new replies.