no-translate

Hide Payment Method at specific Index

Hide payment methods with same name at specific index
Scritto da Andrea Morone
Aggiornato 1 anno fa

When using Shopify Payments, it is possible that multiple payment options with the same name may be provided. For example, Shopify Payments may offer both PayPal Express Checkout and Credit Card options under the same name:

You may have noticed that "Shopify Payments" is listed three times. If you want to hide a specific payment method, you can use an index to identify which one to remove. To do this, simply add a hash symbol (#) followed by the index of the payment method you want to remove. For example, to remove the payment method at index 1, you would use "Shopify Payments#1".

In this way you will hide the payment method identified by id: gid://shopify/PaymentCustomizationPaymentMethod/0

Ti è stato utile questo articolo?