Description
This hook is used to add groups of options to the PayPal feed.
Usage
add_filter( 'gform_paypal_add_option_group', 'your_function_name', 10, 2 );
Parameters
- $feed Feed Object
The configuration details for the current feed. This will be empty when initially creating a new form.
-
$form Form Object
The form for the current feed. This will be empty when initially creating a new form.
Examples
This example adds a group of checkbox fields which would allow the user to enable/disable a group of custom options.
add_filter( 'gform_paypal_add_option_group', 'add_paypal_option_group', 10, 2 ); function add_paypal_options( $feed, $form ) { ?> <div class="margin_vertical_10"> <label class="left_header">My Third Party Options</label> <ul style="overflow:hidden;"> <li> <input type="checkbox" value="1" id="my_third_party_label_option" name="my_third_party_label_option"> <label for="my_third_party_label_option" class="inline">User My Third Party invoice IDs.</label> </li> <li> <input type="checkbox" value="1" id="my_third_party_transactions" name="my_third_party_transactions"> <label for="my_third_party_transactions" class="inline">Send copy of transactions to My Third Party.</label> </li> </ul> </div> <?php }
Source Code
do_action( 'gform_paypal_add_option_group', $this->get_current_feed(), $this->get_current_form() )
This filter is located in GFPayPal::settings_custom() in class-gf-paypal.php.