Is it possible to remove PayPal on certain product

Hi, hope you are well. Our site has received an email asking us to remove certain products as the violate PayPals terms of service (CBD), we generate a high number of sales through these products so completely removing is not really an option.

I know it’s possible to remove the PayPal button from selected product pages, but this will potentially mean that customers would still be able to purchase when adding other items to their basket. Is there a way that if a product is added to the basket the option for PayPal is then removed.

Thanks

Yes, but only in the Shopify Plus plan.

You can have a script that hides the PayPal option when it finds a CBD related product (using tags, or any other method) in your cart.

Hi Sprites, thanks for your reply. Yes we have a shopify plus account. I have come across the below script. Firstly is this what I would need and secondly, we have multiple CBD products, would I need to change the 1st line of the code and then include the product and repeat this process for each product or am I able to put a collection within there so anything within that is included? Thanks for you help

has_no_paypal_tag = Input.cart.line_items.any? { |line_item| line_item.variant.product.tags.include?(‘no-paypal’) }

if has_no_paypal_tag

Output.payment_gateways = Input.payment_gateways.delete_if { |payment_gateway| payment_gateway.name.include?(“PayPal”) }

else

Output.payment_gateways = Input.payment_gateways

end

I found a solution that may work for you here.

Obviously you need to work with SKUs and change the gateway provider.

I hope it works.

This looks just the thing, thank you so much. I will have a play about tomorrow morning.

Could you possibly update that link that points to a possible solution you found. I also need help with this and it seems to be an important issue to many others I’m finding out as well. Thank you!

Hi there,

Unfortunately, we did not get a suitable answer from Shopify Support and so we reached out to a developer on Fivr. He informed us that, as we were on the basic package it would not be possible to write this into the script. We have therefore moved our site to Shopwired where the support is fantastic. They were able to write an extension for us for £135 and it works like a dream. You can check it out on our website www.aloeanmore.co.uk If you want to check out Shopwired you can follow this link https://www.shopwired.co.uk/?affiliate=260300

Cheeers

Maggie

If anyone is searching for a solution for this ridiculous situation with PayPal, the KlinKode PayRules App is brilliant.

It solves this issue really easily and is also inexpensive.

I’m sure I’ll find another use for it too!