Magento – Magento 2 – Changing the PayPal logo on the Checkout page

magento2.2paypal

I am trying to change the PayPal logo that appears on the checkout page, just before the customer is forwarded to PayPal to make a payment. Here is a screenshot:

enter image description here

I looked everywhere and tried to change the file below:

./vendor/magento/module-paypal/view/frontend/templates/payment/mark.phtml

Still no joy. Any help or guidance will be appreciated!

Best Answer

Create the file in the path:

app/design/frontend/[vendor_folder]/[theme_folder]/Magento_Paypal/web/template/payment

The file

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<div class="payment-method" css="_active: getCode() == isChecked()" afterRender="initListeners">
    <div class="payment-method-title field choice">
        <input type="radio"
               name="payment[method]"
               class="radio testing"
               attr="id: getCode()"
               ko-value="getCode()"
               ko-checked="isChecked"
               click="selectPaymentMethod"
               visible="isRadioButtonVisible()"/>
        <label attr="for: getCode()" class="label">
            <!-- PayPal Logo-->
            <!-- Here to change log-->
            <img attr="src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')" class="payment-icon"/>
            <!-- PayPal Logo -->
            <span text="getTitle()"/>
            <a class="action action-help"
               attr="href: getPaymentAcceptanceMarkHref()"
               click="showAcceptanceWindow"
               translate="'What is PayPal?'"/>
        </label>
    </div>
    <div class="payment-method-content">
        <each args="getRegion('messages')" render=""/>
        <div class="checkout-agreements-block">
            <each args="$parent.getRegion('before-place-order')" render=""/>
        </div>
        <div class="actions-toolbar" attr="id: getButtonId()" afterRender="renderPayPalButtons"/>
    </div>
</div>

Finally run the following command

php bin/magento setup:static-content:deploy -f
php bin/magento c:f
Related Topic