As a result of the Magento 2 defect outlined here Magento 2: How to remove Paypal Logo from MiniCart & Shopping Cart Page? I have managed to remove the Paypal logo from the minicart by changing the file: vendor/magento/module-checkout/view/frontend/web/template/minicart/content.html

However this didn't help to remove the button from the actual shopping cart page. I've searched high and low to try and find the code that deploys the button for that page but haven't been able.

Can anyone advise which file controls that in Magento 2?

Thank you in advance!


1 Answer 1



Add following code inside foreach ($methods as $method) loop for removing paypal logo from cart page under total.

<?php if(in_array($method, ['checkout.cart.shortcut.buttons', 'bml.right.logo'])) :?>
    <?php continue;?>
<?php endif;?>

Now your methods.phtml looks like

<?php if (!$block->hasError()): ?>
<?php $methods = $block->getMethods('methods') ?: $block->getMethods('top_methods') ?>
<ul class="checkout methods items checkout-methods-items">
<?php foreach ($methods as $method): ?>
    <?php if(in_array($method, ['checkout.cart.shortcut.buttons', 'bml.right.logo'])) :?>
        <?php continue;?>
    <?php endif;?>
    <?php if ($methodHtml = $block->getMethodHtml($method)): ?>
    <li class="item"><?php /* @escapeNotVerified */ echo $methodHtml; ?></li>
    <?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>

Don't modify core file. Try to modify theme level Or overwrite this template.

  • Thanks so much Sohel, that did the job perfectly. Cheers! Commented Jul 17, 2017 at 1:20
  • Can you accept this answer then, It will help others.
    – Sohel Rana
    Commented Jul 17, 2017 at 4:04

Your Answer

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

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