Rename method for clarity

This commit is contained in:
Matt-Yorkley
2022-01-12 16:01:32 +00:00
parent cb5dd6eed9
commit 58d3ad412a
2 changed files with 5 additions and 5 deletions

View File

@@ -7,11 +7,11 @@ module TermsAndConditionsHelper
end
def render_terms_and_conditions
if platform_terms_required? && terms_and_conditions_activated?
if platform_terms_required? && distributor_terms_required?
render("checkout/all_terms_and_conditions")
elsif platform_terms_required?
render "checkout/platform_terms_of_service"
elsif terms_and_conditions_activated?
elsif distributor_terms_required?
render "checkout/terms_and_conditions"
end
end
@@ -20,8 +20,8 @@ module TermsAndConditionsHelper
TermsOfService.platform_terms_required?
end
def terms_and_conditions_activated?
TermsOfService.terms_and_conditions_activated?(current_order.distributor)
def distributor_terms_required?
TermsOfService.distributor_terms_required?(current_order.distributor)
end
def all_terms_and_conditions_already_accepted?

View File

@@ -15,7 +15,7 @@ class TermsOfService
Spree::Config.shoppers_require_tos
end
def self.terms_and_conditions_activated?(distributor)
def self.distributor_terms_required?(distributor)
distributor.terms_and_conditions.file?
end
end