I need to change the text to my own. help me pls. in what file i can edit it? vendor/magento/module-paypal/view/frontend/web/template/payment/ i tryed to change here, but nothing new on page (after changes i flush magento cash for sure) What function and in which file causes this message to the page? Many thanks!!!

  • In magento 1.x.x redirect message displayed on the page this way <?php echo $this->getRedirectMessage() ?> what function in magento 2 do the same?
    – alex week
    Feb 5, 2019 at 12:23

2 Answers 2


The text you mentioned is available under Magento_Paypal module's KO html Templates files.

If you like to change the Text you mentioned by editing Ko HTML templates files, please go through the files mentions below. Depending on the Paypal method, any of the below mention KO HTML files will be used.

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

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

  • YOURMAGENTOROOT/vendor/magento/module-paypal/view/frontend/web/template/payment/payflow-express-bml.html

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

  • Thanks for the answer! I need to replace "You will be redirected to the PayPal website" with my own. But the paths you indicated were written in my question and i changed the folder name: /vendor/magento/module-paypal/view/frontend/web/template/payment/ to: /vendor/magento/module-paypal/view/frontend/web/template/paymentX/ make flush the cache I was surprised that nothing happened on the payment page. everything remains as it was before I renamed the folder. I can't understand where else can I change something related to the paypal, if nothing changes when i edit or rename files in?
    – alex week
    Feb 5, 2019 at 14:49
  • And it is better to find a function that displays this text on the payment page. What file is it in? In the first magento, it was a function getRedirectMessage which was here / app / design / frontend / base / default / template / paypal / payment /
    – alex week
    Feb 5, 2019 at 14:49
  • @alexweek After changing the text in KO Templated files make sure you clear cache and static files. you remove static files and Cache using this commands sudo rm -rf var/view_preprocessed/* sudo rm -rf var/pub/static/* sudo rm -rf var/cache/* sudo rm -rf var/generated sudo rm -rf var/composer_home sudo rm -rf var/page_cache sudo rm -rf var/view_preprocessed sudo rm -rf pub/static/frontend/* Feb 6, 2019 at 12:37

It depends on which paypal payment method you have configured in backend. By default there are 4 templates in which you can find the text you want to change and they are as below:





So, You can override this files in your theme app/design/frontend/VendorName/ThemeName/Magento_Paypal/web/template/payment/ for text change.

As these are KO templates, you must need to flush magento cache and clear static content files and deploy content again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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