Question

I'm trying to change the text and hyperlink for "What is Paypal?" for Paypal Express Checkout in the Payment step. Which file should i edit?

I changed the text of 'What is paypal?' in vendor\magento\module-paypal\view\frontend\templates\payment\mark.pthml but the changes does not show up on frontend after flush cache & recompile static content. Also, can't find the place to change the hyperlink.

mark.phtml

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile
/**
 * Note: This mark is a requirement of PayPal
 * @var \Magento\Paypal\Block\Express\Form $block
 * @see \Magento\Paypal\Block\Express\Form
 */
$url = $block->escapeUrl($block->getPaymentAcceptanceMarkHref());
?>
<!-- PayPal Logo -->
<img src="<?= $block->escapeUrl($block->getPaymentAcceptanceMarkSrc()) ?>"
     alt="<?= $block->escapeHtml(__('Acceptance Mark')) ?>" class="paypal icon"/>
<a href="<?= /* @noEscape */ $url ?>"
   onclick="javascript:window.open(
           '<?= /* @noEscape */ $url ?>',
           'olcwhatispaypal',
           'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,' +
           'left=0, top=0, width=400, height=350'
       ); return false;"
   class="action paypal about">
    <?php if ($block->getPaymentWhatIs()) {
        echo $block->escapeHtml(__($block->getPaymentWhatIs()));
} else {
        echo $block->escapeHtml(__('What is PayPal test test?'));
} ?>
</a>
<!-- PayPal Logo -->

enter image description here

Was it helpful?

Solution

You can override this file in your theme to change "What is PayPal?" text on checkout page then...

vendor/magento/module-paypal/view/frontend/web/template/payment/paypal-express.html

here

app/design/frontend/Vendor/Theme/Magento_Paypal/web/template/payment/paypal-express.html

Here you can change text and run below command once.

php bin/magento setup:upgrade
php bin/magento cache:clean
php bin/magento cache:flush

Hope this will help you!

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top