Skip to content

Commit

Permalink
Template tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Nov 9, 2023
1 parent d6cf88a commit 5917cd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example-templates/dist/shop/customer/cards.twig
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
</div>

{# Provide a management link for Stripe-provided payment sources: #}
{% if className(gateway) == 'craft\\commerce\\stripe\\gateways\\PaymentIntents' %}
{% if className(gateway) == 'craft\\commerce\\stripe\\gateways\\PaymentIntents' and gateway['billingPortalUrl'] is defined %}
<div class="mt-2">
<a class="text-blue-500 hover:text-blue-600" href="{{ gateway.billingPortalUrl(currentUser) }}">Manage on Stripe &rarr;</a>
<a class="text-blue-500 hover:text-blue-600" href="{{ gateway.getBillingPortalUrl(currentUser) }}">Manage on Stripe &rarr;</a>
</div>
{% endif %}
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions example-templates/src/shop/customer/cards.twig
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
</div>

{# Provide a management link for Stripe-provided payment sources: #}
{% if className(gateway) == 'craft\\commerce\\stripe\\gateways\\PaymentIntents' %}
{% if className(gateway) == 'craft\\commerce\\stripe\\gateways\\PaymentIntents' and gateway['billingPortalUrl'] is defined %}
<div class="mt-2">
<a class="[[classes.a]]" href="{{ gateway.billingPortalUrl(currentUser) }}">Manage on Stripe &rarr;</a>
<a class="[[classes.a]]" href="{{ gateway.getBillingPortalUrl(currentUser) }}">Manage on Stripe &rarr;</a>
</div>
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 5917cd7

Please sign in to comment.