• Resolved pinal.shah

    (@pinalshah)


    Hi there,

    I’ve added a custom field on the WC Checkout page. The field is set to be mandatory.

    When the user is not logged into Amazon, the field is added using the hook woocommerce_after_checkout_billing_form in the Billing section. This works fine for other payment gateways such as Paypal, Stripe and so on.

    In a scenario where the user is logged into Amazon and wants to complete the payment using Amazon Pay, the field is added using the hook woocommerce_checkout_after_customer_details.

    Even though the field is set to be mandatory and an asterik is displayed along with the field label indicating its mandatory, users are able to complete the payment when the field is left blanks.

    Can you please guide me on how to ensure that validation is performed when the user tries to pay using Amazon Pay?

    The field is not present in the list of fields for the below filters:
    1. woocommerce_billing_fields
    2. woocommerce_shipping_fields

    Any help is greatly appreciated.

    Thanks,
    Pinal

Viewing 1 replies (of 1 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    Sorry about the delay in this response.

    With Amazon Pay, there’s not really a way to validate fields on the checkout page that you’ve added, as the checkout is essentially bypassed entirely by using the checkout flow in Amazon Pay.

    Hopefully that helps! Have a great one!

Viewing 1 replies (of 1 total)
  • The topic ‘Add validation for custom field’ is closed to new replies.