Solution for Woocommerce Checkout Expiry not Accepting Slash (/) on iPhone

Here is my solution for Woocommerce checkout expiry (expiration date) field not accepting slash (/) on iPhone… note this is a change in file /plugins/woocommerce/includes/gateways/class-wc-payment-gateway-cc.php starting on line 50. I’ve changed the field type to “” and inputmode to “” in all cases.

This will cause the iPhone to bring up the full keyboard screen instead of the number pad. It’s an inconvenience but the alternative is to lose sales because the iPhone user can’t complete an order. Or has to figure out that they need to copy their expiration date with a slash from a text field and then paste it into the expiry field.

The better solution in my opinion would be for Woocommerce to have coded two number fields with the slash (/) inserted programatically.

…just say’n