Skip to content

Instantly share code, notes, and snippets.

@3GA
3GA / Gravity Forms Get Credit Card Details
Created August 3, 2016 11:00 — forked from DeveloperWil/Gravity Forms Get Credit Card Details
Enables the credit card fields for Gravity Forms and provides a function to get the credit card details which are not available through the filter $form or $entry
//Turn on our credit card field for admin and front end
add_action("gform_enable_credit_card_field", "enable_creditcard");
function enable_creditcard($is_enabled){
return true;
}
//Email encoded card details when the form is submitted.
add_action('gform_after_submission', 'email_encoded_cc', 10, 2);
function email_encoded_cc($entry, $form) {
function get_creditcard_field($form){
$fields = GFCommon::get_fields_by_type($form, array("creditcard"));