Add module path to load the card icons

This commit is contained in:
Emili Castells Guasch 2024-05-13 18:18:50 +02:00
parent b5f4e03f2a
commit 2bcdd77ba6
2 changed files with 2 additions and 1 deletions

View file

@ -52,7 +52,7 @@ class CardView {
<img
class="ppcp-card-icon"
title="${data.value('brand')}"
src="/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/assets/images/axo/${cardIcons[data.value('brand')]}"
src="${window.wc_ppcp_axo.module_url}/assets/images/axo/${cardIcons[data.value('brand')]}"
alt="${data.value('brand')}"
>
</div>

View file

@ -197,6 +197,7 @@ class AxoManager {
'CA' => WC()->countries->get_states( 'CA' ),
),
),
'module_url' => untrailingslashit( $this->module_url ),
);
}