From 0ebd45909464c6967ffbedf0815a19f558a66e4e Mon Sep 17 00:00:00 2001
From: Nibiru <nibiru@mac.com>
Date: Tue, 5 Nov 2024 13:59:27 +0100
Subject: [PATCH] Update (removed) payment sources method

Replaced getAllPaymentSourcesByUserId with getAllPaymentSourcesByCustomerId to reflect the changes from Commerce where that function has been removed in 5.x
---
 templates/_includes/components/payment/sourcesList.twig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/_includes/components/payment/sourcesList.twig b/templates/_includes/components/payment/sourcesList.twig
index fe4f1c33..6e7dd6ec 100644
--- a/templates/_includes/components/payment/sourcesList.twig
+++ b/templates/_includes/components/payment/sourcesList.twig
@@ -1,7 +1,7 @@
 
 {% set radio = radio is not defined ? false : radio %}
 {% set account = account is not defined ? true : account %}
-{% set paymentSources = craft.commerce.paymentSources.getAllPaymentSourcesByUserId(currentUser.id) %}
+{% set paymentSources = craft.commerce.paymentSources.getAllPaymentSourcesByCustomerId(currentUser.id) %}
 
 <!-- Template: {{ _self }}.twig -->
 <div class="space-y-2">
@@ -58,4 +58,4 @@
       </button>
     </div>
   {% endif %}
-</div>
\ No newline at end of file
+</div>