B2B on Shopify - How to hide PO payment method for B2B Companies/Customers?

DeeDee-TDY
Shopify Partner
46 4 4

I have created a B2B structure on a dev store and would like to hide the PO number payment option when net terms are not selected for the B2B company. The PO number field seems to always be displayed.

Is it possible to hide the PO payment method (similar to how to hide payment methods for D2C customers with the payment_customization function)?

DeeDeeTDY_0-1694012631861.png

 

Replies 8 (8)

SBD_
Shopify Staff
1829 269 409

Hey @DeeDee-TDY 

 

You should be able to conditionally show a PO field using Checkout UI Extensions. This API will give you payment details and here's the payment location.

Scott | Developer Advocate @ Shopify 

DeeDee-TDY
Shopify Partner
46 4 4

I don't understand how to hide a Shopify built-in display item with checkout-ui. as there is no control over rendering (or not).  Is there a particular react hook to hide the automatic displayed B2B PO number payment method, that displays after the Billing address, from a checkout ui app? (This field automatically displays when the logged in customer is added to a company)

Example customer part of company:

DeeDeeTDY_1-1694190764349.png

In this case, the checkout payment page displays a PO number field underneath the billing address:

DeeDeeTDY_0-1694190604058.png

 

 

I have tried the checkout function for payment customization, and retrieved the paymentMethods from GraphQl query, but the only payment method logged when traversing the paymentMethods array is: '(for testing) Bogus Gateway' (nothing regarding a PO number)

input.paymentMethods.forEach((element) => console.log('tdy-payments DEBUG: Payment Method Name ', element.name));
   Where am I going wrong?
SBD_
Shopify Staff
1829 269 409

Hey @DeeDee-TDY 

 

My mistake - I didn't realise this was a native Shopify field. I don't think it's possible.

Scott | Developer Advocate @ Shopify 

hagerdavid
Shopify Partner
1 0 0

Hey there @SBD_

 

So, how is it going, can you remove that field?

SBD_
Shopify Staff
1829 269 409

Hey @hagerdavid 

 

Unfortunately not.

Scott | Developer Advocate @ Shopify 

DeeDee-TDY
Shopify Partner
46 4 4

Hi Scott - thanks much for the reply! Is there something in the works to allow hiding of the purchase order for B2B customers, or is it a fixed feature?

agentfitz
Shopify Partner
6 0 0

Replying here as well to say that this is a critical feature for us (Shopify Plus customer). Let us hide the PO number! Our customers are dealers are literally putting "notes" in there and expecting us to respond to them, and that is not a part of what we do! We need to hide this field!

JT35
Shopify Partner
2 0 0

sorry wrong thread