You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in the title, I want to push the user's email into the checkout form when I open using .GetWebCheckoutLink.
I tried to use cartState.SetEmailAddress, but I am getting a null reference exception being thrown.
publicvoidAddItemToCart(){//Reset the cart because there's a bug with it not updating if the users open it when it's empty.cart.Reset();// Try to set the user e-mail in the checkout.cartState.SetEmailAddress(tMP_InputField.text,(error)=>{});//DefaultQueries.checkout.EmailUpdate(query, CurrentCheckout.id(), email);//For every cartItem in the List of CartItems, we add it to the cart after we reset it.foreach(varcartItemincartItems){cart.LineItems.AddOrUpdate(cartItem,1);}}
Any help is kindly appreciated!
EDIT:
This is the error I am getting:
And this is the line it's referring to (Where my horizontal cursor is):
As stated in the title, I want to push the user's email into the checkout form when I open using .GetWebCheckoutLink.
I tried to use cartState.SetEmailAddress, but I am getting a null reference exception being thrown.
Any help is kindly appreciated!
EDIT:
This is the error I am getting:
And this is the line it's referring to (Where my horizontal cursor is):