mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix bug in terms_and_conditions_helper related to guest checkout where current_user is nil and T&Cs must be shown all the time
This commit is contained in:
@@ -6,7 +6,7 @@ module TermsAndConditionsHelper
|
||||
end
|
||||
|
||||
def terms_and_conditions_already_accepted?
|
||||
customer_terms_and_conditions_accepted_at = spree_current_user.
|
||||
customer_terms_and_conditions_accepted_at = spree_current_user&.
|
||||
customer_of(current_order.distributor)&.terms_and_conditions_accepted_at
|
||||
|
||||
customer_terms_and_conditions_accepted_at.present? &&
|
||||
|
||||
Reference in New Issue
Block a user