This filter can be used to modify the subscription object before it is sent to


The filter which would run for all ‘subscription’ type feeds can be used like so:

add_filter( 'gform_authorizenet_subscription_pre_create', 'your_function_name', 10, 5 );


  • $subscription object

    The subscription object.

  • $form_data Form Data

    An associative array containing the form title, billing address, payment amount, setup fee amount, line items created using the submitted pricing field values and any discounts from coupons.

  • $config Config

    The feed which is currently being processed.

  • $form

    The form which is currently being processed.

  • $entry Entry Object

    The entry which is currently being processed. Since version 2.1.8.


1. Change startDate

The following example shows how you can set the start date. Please note requires the startDate be in the YYYY-MM-DD format.

add_filter( 'gform_authorizenet_subscription_pre_create', function ( $subscription, $form_data, $config, $form, $entry ) {
    $subscription->startDate = rgar( $entry, '10' );

    return $subscription;
}, 10, 5 );


Your code snippet should be placed in the functions.php file of your active theme.

Source Code

This filter is located in GFAuthorizeNet::subscribe() in class-gf-authorizenet.php