Discussing Shopify Functions development, deployment, and usage in Shopify apps.
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)?
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
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:
In this case, the checkout payment page displays a PO number field underneath the billing address:
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));
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
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?
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!
sorry wrong thread