1

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

3

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!

2
  • 1
    Thank you. In my case I have to use 'paypal-express-in-context.html' instead. Also, for editing the url, i have to copy '/var/www/html/vendor/magento/module-paypal/Model/Config.php' to app folder and edit around line 1055. Nov 15 '19 at 17:45
  • You're welcome 😊👍 Nov 16 '19 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.