Forum Replies Created

Viewing 15 replies - 16 through 30 (of 93 total)
  • Thread Starter melchi2

    (@melchi2)

    Thanks Veronica, good day

    Thread Starter melchi2

    (@melchi2)

    Hello, I wanted to apologize for the multiple post, I will see to hire a competent developer because the last one unfortunately deceived me. Thank you all for your time.

    Thread Starter melchi2

    (@melchi2)

    Hello, I tried everything but the sponsor does not receive an email, I even looked at and integrated the example of Champ, https:https://www.champ.ninja/2020/05/custom-email-notifications/

    /**
      * Set custom email notification template and setting
      */
     function um_custom_validate_account( $notifications ){
    
    	$notifications['um_custom_validate_account'] = array(
    		'key'           	=> 'um_custom_validate_account',
    		'title'         	=> __( 'Send Email for Sponsors Validation','ultimate-member' ),
    		'subject'       	=> '{site_name} - Someone you have sponsored on the site needs to attention',
    		'body'          	=> 'Hi,<br /><br />'.
    		                   ' You have sponsored "{profile_name}" on the site.<br /><br />'.
    		                   'To view profile, please click the following link: {user_profile_url}',
    		'description'   	=> __('Whether to send the sponsor an email when someone registered has sponsored with.','ultimate-member'),
    		'recipient'   	 	=> 'admin',
    		'default_active' 	=> true
    	);
    
    	return $notifications;
    }
    add_filter( 'um_email_notifications', 'um_custom_validate_account', 10, 2 );
    
    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors( $user_id ){
        $user_id = $user->ID;
        um_fetch_user( $user_id ); 
        $sponsor_recipient  = um_user( 'email_parrain' );
    	$profile_name  = um_user( 'user_login ');
    	$profile_url  = um_user_profile_url( $user_id );
    
    	UM()->mail()->send( $sponsor_recipient,'um_custom_validate_account', array(
    				'plain_text'	 => 0,
    				'tags'				 => array(
    					'{profile_name}',
    					'{profile_url}',
    				),
    				'tags_replace' => array(
    					$profile_name,
    					$profile_url,
    				)
    	) );
    }
    add_action("um_user_register","um_notify_sponsors",10, 2);

    With this script I have the notification but it empties the profile once the validation is done

    /**
      * Set custom email notification template and setting
      */
      
     function um_custom_validate_account( $notifications ){
    
            $notifications['um_custom_validate_account'] = array(
                    'key'                  => 'um_custom_validate_account',
                    'title'                => __( 'Send Email for Sponsors Validation','ultimate-member' ),
                    'subject'              => '{site_name} - Someone you have sponsored on the site needs to attention',
                    'body'                 => 'Hi,<br /><br />'.
                                       ' You have sponsored "{profile_name}" on the site.<br /><br />'.
                                       '',
                    'description'          => __('Whether to send the sponsor an email when someone registered has sponsored with.','ultimate-member'),
                    'recipient'      => 'admin',
                    'default_active'       => true
            );
    
            return $notifications;
    }
    add_filter( 'um_email_notifications', 'um_custom_validate_account', 10, 1 );
    
    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors($data)
    {
       
    		$sponsor_recipient = $data['email_parrain'];
    	
            $profile_name =$data['user_login'];
    		
            $profile_url = "";
    		
    		
            UM()->mail()->send( $sponsor_recipient, 'um_custom_validate_account', array(
                                    'plain_text' =>0 ,
                                    'tags' => array(
                                            '{profile_name}',
                                            '{profile_url}',
                                    ),
                                    'tags_replace' => array(
                                            $profile_name,
                                            $profile_url,
                                    )
            ) );
    		
    		
    
    		
    }
    
    add_action("um_before_save_filter_submitted","um_notify_sponsors",10, 1);
    
    ?>
    Thread Starter melchi2

    (@melchi2)

    Hello Veronica,

    I tried with your code but I do not receive the godfather does not receive an email
    On the registration form, I modified the email to put custom email, I tried with the keys um_custom_validate_account and um_notify_sponsors, but unfortunately nothing works. Here is the code used

    /**
      * Set custom email notification template and setting
      */
     function um_custom_validate_account( $notifications ){
    
    	$notifications['um_custom_validate_account'] = array(
    		'key'           	=> 'um_custom_validate_account',
    		'title'         	=> __( 'Send Email for Sponsors Validation','ultimate-member' ),
    		'subject'       	=> '{site_name} - Someone you have sponsored on the site needs to attention',
    		'body'          	=> 'Hi,<br /><br />'.
    		                   ' You have sponsored "{profile_name}" on the site.<br /><br />'.
    		                   'To view profile, please click the following link: {user_profile_url}',
    		'description'   	=> __('Whether to send the sponsor an email when someone registered has sponsored with.','ultimate-member'),
    		'recipient'   	 	=> 'admin',
    		'default_active' 	=> true
    	);
    
    	return $notifications;
    }
    add_filter( 'um_email_notifications', 'um_custom_validate_account', 10, 1 );
    
    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors( $user_id ){
        $user_id = $user->ID;
        um_fetch_user( $user_id ); 
        $sponsor_recipient  = um_user( 'email_parrain' );
    	$profile_name  = um_user( 'user_login ');
    	$profile_url  = um_user_profile_url( $user_id );
    
    	UM()->mail()->send( $sponsor_recipient, 'um_custom_validate_account', array(
    				'plain_text'	 => 0,
    				'tags'				 => array(
    					'{profile_name}',
    					'{profile_url}',
    				),
    				'tags_replace' => array(
    					$profile_name,
    					$profile_url,
    				)
    	) );
    }
    add_action("um_user_register","um_notify_sponsors",10, 2);
    Thread Starter melchi2

    (@melchi2)

    With this code the sponsor receives the notification
    but the form is empty, with your code it’s the opposite. I have tried everything without success

    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors($data)
    {
       
    		$sponsor_recipient = $data['email_parrain'];
    	
            $profile_name =$data['user_login'];
    		
            $profile_url = "";
    		
    		
            UM()->mail()->send( $sponsor_recipient, 'um_custom_validate_account', array(
                                    'plain_text' =>0 ,
                                    'tags' => array(
                                            '{profile_name}',
                                            '{profile_url}',
                                    ),
                                    'tags_replace' => array(
                                            $profile_name,
                                            $profile_url,
                                    )
            ) );
    		
    		
    
    		
    }
    
    add_action("um_before_save_filter_submitted","um_notify_sponsors",10, 1);
    • This reply was modified 2 years, 4 months ago by melchi2.
    Thread Starter melchi2

    (@melchi2)

    Thank you very much, I confess from memory before everything was in .com. I’m putting the ticket as solved because I assume it will be part of a system update

    Thread Starter melchi2

    (@melchi2)

    Now the profile is complete but the sponsor no longer receives emails, it’s madness. I’ll try to improve, I’m crossing my fingers, thanks again Veronica

    Thread Starter melchi2

    (@melchi2)

    Thanks Veronica , i try

    • This reply was modified 2 years, 4 months ago by melchi2.
    Thread Starter melchi2

    (@melchi2)

    I also tried with this code but without success, I can’t do it. I called a developer but he can’t do it

    /**
      * Set custom email notification template and setting
      */
      
     function um_custom_validate_account( $notifications ){
    
            $notifications['um_custom_validate_account'] = array(
                    'key'                  => 'um_custom_validate_account',
                    'title'                => __( 'Send Email for Sponsors Validation','ultimate-member' ),
                    'subject'              => '{site_name} - Someone you have sponsored on the site needs to attention',
                    'body'                 => 'Hi,<br /><br />'.
                                       ' You have sponsored "{profile_name}" on the site.<br /><br />'.
                                        'To view profile, please click the following link: {user_profile_url}',
                    'description'          => __('Whether to send the sponsor an email when someone registered has sponsored with.','ultimate-member'),
                    'recipient'      => 'email',
                    'default_active'       => true
            );
    
            return $notifications;
    }
    add_filter( 'um_email_notifications', 'um_custom_validate_account', 10, 1 );
    
    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors( $user_id ){
       
        um_fetch_user( $user_id );
        $sponsor_recipient = $user_id['email_parrain'];
            $profile_name = $user_id['identifiant'];
            $profile_url = um_user_profile_url( $user_id );
    		
    		
            UM()->mail()->send( $sponsor_recipient, 'um_custom_validate_account', array(
                                    'plain_text' =>1 ,
                                    'tags' => array(
                                            '{profile_name}',
                                            '{profile_url}',
                                    ),
                                    'tags_replace' => array(
                                            $profile_name,
                                            $profile_url,
                                    )
            ) );
    		
    		
    
    		
    }
    
    add_action("um_before_save_filter_submitted","um_notify_sponsors",10, 1);
    Thread Starter melchi2

    (@melchi2)

    Hello Veronica,

    It’s always a pleasure to read you, unfortunately, after analysis everything depends on the account that posted the video on youtube, thank you for everything, I’ll try to find a com link. It’s a pity that there is not an acceptance of all links.

    Thread Starter melchi2

    (@melchi2)

    the original code dont work
    The code snippet you are trying to save produced a fatal error at line 0:

    Directive ‘allow_url_include’ is deprecated

    Thread Starter melchi2

    (@melchi2)

    Le code snippset original is:

    '&'      $notifications['um_custom_validate_account'] = array(
                    '&'#039;key'                  => '&'#039;um_custom_validate_account',
                    '&'#039;title'                => __( '&'#039;Send Email for Sponsors Validation','ultimate-member' ),
                    '&'#039;subject'              => '&'#039;{site_name} - Someone you have sponsored on the site needs to attention',
                    '&'#039;body'                 => '&'#039;Hi,<br /><br />'.
                                       '&'#039; You have sponsored '&'quot;{profile_name}&quot; on the site.<br /><br />'.
                                       '&'#039;To view profile, please click the following link: {user_profile_url}',
                    '&'#039;description'          => __('Whether to send the sponsor an email when someone registered has sponsored with.','ultimate-member'),
                    '&'#039;recipient'      => '&'#039;admin',
                    '&'#039;default_active'       => true
            );
    
            return '$notifications';
    }
    add_filter( '&'#039;um_email_notifications', '&'#039;um_custom_validate_account', 10, 1 );
    
    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors( $user_id ){
       
        um_fetch_user( $user_id );
        $sponsor_recipient = um_user(&quot;email_parrain);
            $profile_name = um_user(&quot;display_name&quot;);
            $profile_url = um_user_profile_url( $user_id );
    
            UM()->mail()->send( $recipient, '&'#039;um_custom_validate_account', array(
                                    '&'#039;plain_text'   => 1,
                                    '&'#039;tags'                                 => array(
                                            '&'#039;{profile_name}',
                                            '&'#039;{profile_url}',
                                    ),
                                    '&'#039;tags_replace' => array(
                                            $profile_name,
                                            $profile_url,
                                    )
            ) );
    }
    add_action(&quot;um_user_register&quot;,&quot;um_notify_sponsors&quot;,10, 1);
    Thread Starter melchi2

    (@melchi2)

    Bonjour,

    Malgré de multiples essaie le parrain ne re?oit pas les mails

    /**
      * Set custom email notification template and setting
      */
     function um_custom_validate_account( $notifications ){
    
            $notifications['um_custom_validate_account'] = array(
                    'key'                  => 'um_custom_validate_account',
                    'title'                => __( 'Send Email for Sponsors Validation','ultimate-member' ),
                    'subject'              => '{site_name} - Someone you have sponsored on the site needs to attention',
                    'body'                 => 'Hi,<br /><br />'.
                                       ' You have sponsored "{profile_name}" on the site.<br /><br />'.
                                       'To view profile, please click the following link: {user_profile_url}',
                    'description'          => __('Whether to send the sponsor an email when someone registered has sponsored with.','ultimate-member'),
                    'recipient'      => 'admin',
                    'default_active'       => true
            );
    
            return $notifications;
    }
    add_filter( 'um_email_notifications', 'um_custom_validate_account', 10, 1 );
    
    /**
     * Send email notification to the sponsor
     */
    function um_notify_sponsors( $user_id ){
       
        um_fetch_user( $user_id );
        $sponsor_recipient = um_user("email_parrain");
            $profile_name = um_user("display_name");
            $profile_url = um_user_profile_url( $user_id );
    
            UM()->mail()->send( $sponsor_recipient, 'um_custom_validate_account', array(
                                    'plain_text' => 1,
                                    'tags' => array(
                                            '{profile_name}',
                                            '{profile_url}',
                                    ),
                                    'tags_replace' => array(
                                            $profile_name,
                                            $profile_url,
                                    )
            ) );
    }
    
    add_action("um_user_register","um_notify_sponsors",10, 1);
    Forum: Plugins
    In reply to: [LiteSpeed Cache] Slow mp4
    Thread Starter melchi2

    (@melchi2)

    It s good, i resolved, thanks for the time

    Forum: Plugins
    In reply to: [LiteSpeed Cache] Slow mp4
    Thread Starter melchi2

    (@melchi2)

    We will make it simpler because apart from the video the rest works perfectly. Can we exclude the mp4 extension?

Viewing 15 replies - 16 through 30 (of 93 total)