5

I got 2 variations of the store - EU and USA. I need to disable the PayPal Express method on the EU store, how can I do that?

enter image description here

There no option to disable Payment on EU store: enter image description here But avaliable on default config:

enter image description here

2
  • have you tried disabling it via the configuration in the Admin-Backend? Commented Jul 2, 2019 at 7:59
  • @PhilippSander watch the screenshots and description that I added. Thanks.
    – Ashen One
    Commented Jul 2, 2019 at 8:56

1 Answer 1

0

I waste much time to make a bad hack. Here payments methods displays:

<div if="isPaymentMethodsAvailable()"
 class="items payment-methods">
<div repeat="foreach: paymentGroupsList, item: '$group'"
     class="payment-group">
    <div if="getRegion($group().displayArea)().length"
         translate="getGroupTitle($group)"
         class="step-title"
         data-role="title">
    </div>
    <each args="data: getRegion($group().displayArea), as: 'method'" render=""/>
</div>

I changed PayPal title from the admin menu on EU store to PayPal hidden

I found the js file that renders this components:

Magento_Checkout/web/js/view/payment/list.js

Then I check on initChildren method this title:

        initChildren: function () {
        var self = this;

        _.each(paymentMethods(), function (paymentMethodData) {
            if(paymentMethodData.title!="PayPal hidden") {
                self.createRenderer(paymentMethodData);
            }
        });

        return this;
    },

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.