Created
April 6, 2016 17:27
-
-
Save tharmann/77e93cf894336252484533b50dda7fb9 to your computer and use it in GitHub Desktop.
Add a more descriptive tooltip to the CVC field on the WooCommerce order form credit card fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//add tooltip to cvc field | |
function custom_credit_card_fields_cis_cc ($cc_fields , $payment_id){ | |
$cc_fields['card-cvc-field'] = str_replace('<p class="form-row form-row-last">','<p class="form-row form-row-last" title="3-digit security code usually found on the back of your card. American Express cards have a 4-digit code located on the front.">',$cc_fields['card-cvc-field']); | |
return $cc_fields; | |
} | |
add_filter( 'woocommerce_credit_card_form_fields' , 'custom_credit_card_fields_cis_cc' , 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment