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

    Thanks for the detailed response.

    Yes, If you have set the purchases with account (No guest checkout) then user has to logged in to view the purchase receipt.

    I have checked the login form is working for me.

    Are you getting any spefic error while logging in it?

    Thread Starter kaquna

    (@kaquna)

    when click in the link in the receipt mail, go to a page type domain.com/?payment_key=(the_key)&edd_action=view_receipt
    in the page appears a login form.
    I insert the correct user and pass. then, the page seems to load something but the same form reappears. cannot login…

    Hi @kaquna

    I have setup the same scenario in my end and I found that there is a bug in EDD core functionality.

    I will raise the issue in Git hub and send you the link so you can check the status of it.

    Thread Starter kaquna

    (@kaquna)

    many thanks

    Thread Starter kaquna

    (@kaquna)

    I have test it and if in actions.php change the order and put add_action( ‘init’, ‘edd_get_actions’ ) after add_action( ‘init’, ‘edd_post_actions’ ) the login is produced but I go to home page…

    Hi @kaquna

    Can you please tell me what exactly you have changed?

    Thread Starter kaquna

    (@kaquna)

    in github you say:

    EDD Action code is written in this file : includes/actions.php edd_get_actions and edd_post_actions
    […]
    There are two solution for this.
    One is put the edd_post_actions function before edd_get_actions function so it will run post actions before the get actions.

    so I move, in the includes/actions.php the line 36 (add_action( ‘init’, ‘edd_get_actions’ );) after the line 59 (add_action( ‘init’, ‘edd_post_actions’ );)
    πŸ˜€
    the result is that the login is produced but redirect to home page, not to receipt view…

    Hi @kaquna

    Sorry for my delay response.

    Where you have set the redirect via shortcode? or setting page?

    Thread Starter kaquna

    (@kaquna)

    I test making the change directly in the file actions.php
    I don’t know if this is the correct way…

    Hi @kaquna

    I mean where you have set the redirection after login? Via shortcode or setting page?

    Thread Starter kaquna

    (@kaquna)

    hi

    I haven’t made any redirection…

    I click on the link that leads to the mail. This takes me to the page with two possibilities:
    1. if I am logged in, the link takes me to the receipt page.
    2. if I am not logged in, the login form is looped.

    after making the suggested change (although I don’t know if I’ve done it properly):

    1. if I am logged in, the link takes me to the receipt page.
    2. if I am not logged in, the form works and I access, but it takes me to the home page.

    πŸ˜€

    Hi @kaquna

    Thanks for your patience. Yes, there is a little bug for this. It is taking home URL as a current redirection.

    Please add below code to your child theme / theme functions.php file. This will help you get your desired result.

    function __edd_get_current_page_url( $uri ) {
    
    	if( isset( $_GET['payment_key'] ) && isset( $_GET['edd_action'] ) && $_GET['edd_action'] == 'view_receipt' ) {
    		$uri = add_query_arg( array( 'modify' => false ) );
    	}
    
    	return $uri;
    }
    add_filter( 'edd_get_current_page_url', '__edd_get_current_page_url' );

    I hope this will work for you πŸ™‚

    Thread Starter kaquna

    (@kaquna)

    works fine!
    many thanks, @pratik-jain

    I hope this changes can be set in next updates πŸ™‚

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘browser receipt view’ is closed to new replies.