Skip to content

For createCustomer, Square carries out telephone number validation that is not built into checkout #295

@nicdwilson

Description

@nicdwilson

Description

Square now requires that telephone numbers submitted from sites outside of the account country contain an international dialing prefix.

For example, a US based Square account cannot submit a createCustomer where the customer is based in the UK, without the +44 prefix.

This affects sites selling subscriptions and requesting a telephone number, since the number, though not required by createCustomer must be valid if submitted for the createCustomer. If the createCustomer fails, the transaction fails, since without a saved payment method, subscriptions will not go through on most sites.

WooCommerce core does not provide telephone number validation, although these are available via third party plugins.

Because createCustomer does not require the telephone number in the first place, it would be possible to remove the telephone number from all createCustomer requests where the number does not include the + or it might be possible to add telephone number validation before sending the request.

Strictly, this is not a bug, but an enhancement. However, the behaviour can be confusing and is poorly documented for merchants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions