DescriptionUsageParametersExamplesPlacementSinceSource Code
Description
This filter is executed when creating the Stripe Card or Square field and can be used to modify the 「Card Details」 label.
Usage
1add_filter( 'gform_card_details', 'change_details', 10, 2 );
Parameters
$label string
The label to be filtered.
$form_id integer
The current form』s id.
Examples
This example changes the default Card Details label:
1234add_filter( 'gform_card_details', 'change_details', 10, 2 );function change_details( $label, $form_id ) { return "Credit Card Specifics";}
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Stripe 2.6 and Square 1.0.
Source Code
Stripe add-on: This filter is located in GF_Field_Stripe_CreditCard::get_form_editor_inline_script_on_page_render() in gravityformsstripe/includes/class-gf-field-stripe-creditcard.php
Square add-on: This filter is located in GF_Field_Square_CreditCard::get_form_editor_inline_script_on_page_render() in gravityformssquare/includes/class-gf-field-square-creditcard.php