Description
The gform_aweber_post_subscriber_created hook can be used to perform custom actions after the subscriber has been successfully added to the AWeber list.
Usage
The hook which would run for all AWeber feeds can be used like so:
add_filter( 'gform_aweber_post_subscriber_created', 'your_function_name', 10, 4 );
Parameters
- $subscriber array
An associative array containing the subscriber properties returned by AWeber in the response to the create request.
-
$form Form Object
The Form which is currently being processed.
-
$entry Entry Object
The Entry which is currently being processed.
-
$feed Feed Object
The Feed which is currently being processed.
Examples
1. Store a property in the entry meta
The following example shows how you can store the value from one of the subscriber properties in the entry meta.
add_action( 'gform_aweber_post_subscriber_created', function ( $subscriber, $form, $entry, $feed ) { gform_update_meta( $entry['id'], 'aweber_subscriber_status', rgar( $subscriber, 'status' ) ); }, 10, 4 );
Placement
Your code snippet should be placed in the functions.php file of your active theme.
Since
This hook was added in AWeber version 2.4.1.
Source Code
This filter is located in GFAWeber::export_feed() in class-gf-aweber.php.