• Resolved Website Academy

    (@rfmcomposer)


    I need the first name and email address on the thank you page. There is a link on the thank you page that needs this info as url parameters like this:

    domain.com/link-to-next-page/?n=firstname&e=emailaddress

    Is this possible with Cartflows?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support CartFlows Team

    (@cartflows)

    Hello @rfmcomposer,

    Thank you for reaching out to us.

    Here is the code which will give you email and first name on thank you page.

    add_action( 'woocommerce_thankyou', 'my_custom_tracking' );
    
    function my_custom_tracking( $order_id ) {
    
    	// condition to check CartFlows thankyou page
    	if(_is_wcf_thankyou_type()){
    		// Lets grab the order
    		$order = wc_get_order( $order_id );
    
    		//order user id
    		//$customer_id = (int)$order->user_id;
    		
    		echo $order->get_billing_email();
    		echo $order->get_billing_first_name();
        }
    }

    Put the above code in function.php file of your child theme.

    Thank You.

    Thread Starter Website Academy

    (@rfmcomposer)

    Thanks!

    This will echo the info on the thank you page without the possibility to control where I think.

    I need the info in a url.

    Do you also have shortcodes like this?:

    [wcf param="billing_first_name"]
    [wcf param="billing_first_name"]

    Then I can use it in my url like this:

    domain.com/link-to-next-page/?n=[wcf param="billing_first_name"]&e=[wcf param="billing_email"]

    I think that is a nice feature… ??

    Plugin Support CartFlows Team

    (@cartflows)

    Hello @rfmcomposer,

    For now, it is not possible but we will add this feature in our development queue.

    Thank you for your suggestion!

    Thread Starter Website Academy

    (@rfmcomposer)

    OK, thanks. Will wait for that!

    Plugin Support CartFlows Team

    (@cartflows)

    Hello @rfmcomposer,

    If you have any quetions please feel free to open a support ticket here.

    We are happy to help you.

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘First name & email address on thank you page?’ is closed to new replies.