Spree::Core::CurrentOrder.module_eval do
  # Associate the new order with the currently authenticated user before saving
  def before_save_new_order
    @current_order.user ||= spree_current_user
  end

  def after_save_new_order
    # make sure the user has permission to access the order (if they are a guest)
    return if spree_current_user
    session[:access_token] = @current_order.token
  end
end

Spree::Core::CurrentOrder.module_eval do
  def after_save_new_order
    # make sure the user has permission to access the order (if they are a guest)
    return if spree_current_user
    session[:access_token] = @current_order.token
  end
end

Remove before_save_new_order method which does the same as associate user
Remove before_save_new_order method which does the same as associate user
