Module: Workarea::Storefront::AfterpayHelper

Defined in:
app/helpers/workarea/storefront/afterpay_helper.rb

Instance Method Summary collapse

Instance Method Details

get the relevant learn more link from a price.

Returns:

  • String



8
9
10
11
12
13
# File 'app/helpers/workarea/storefront/afterpay_helper.rb', line 8

def learn_more_link(price)
  currency = price.currency.iso_code.to_sym
  location = Workarea::Afterpay.config[:currency_country_map][currency].to_sym.downcase
  return unless location.present?
  afterpay_dialog_path(location: location)
end