Skip to content

Instantly share code, notes, and snippets.

@kilbot
Created August 14, 2017 07:26
Show Gist options
  • Save kilbot/b6911504d7fd1fa9364f88ab31f482c2 to your computer and use it in GitHub Desktop.
Save kilbot/b6911504d7fd1fa9364f88ab31f482c2 to your computer and use it in GitHub Desktop.
Removing type="tel" from Stripe credit card fields
<?php
// the code below goes in your functions.php file
function my_custom_pos_templates($templates){
if(isset($templates['pos']['checkout']['gateways']['stripe'])) {
$templates['pos']['checkout']['gateways']['stripe'] = str_replace('type="tel"','',$templates['pos']['checkout']['gateways']['stripe']);
}
return $templates;
}
add_filter('woocommerce_pos_templates', 'my_custom_pos_templates');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment