mc4wp_subscribe
The MailChimp for WordPress Lite mc4wp subscribe hook.
Description
do_action( 'mc4wp_subscribe', (unknown) $email, (unknown) $list_id, (unknown) $merge_vars, (unknown) $result, (string) $checkbox, (unknown) $type, (unknown) $related_object_id );
Parameters (7)
- 0. $email (unknown)
- The email.
- 1. $list_id (unknown)
- The list id.
- 2. $merge_vars (unknown)
- The merge vars.
- 3. $result (unknown)
- The result.
- 4. $checkbox (string) =>
'checkbox'
- The checkbox.
- 5. $type (unknown)
- The type.
- 6. $related_object_id (unknown)
- The related object id.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'mc4wp_subscribe', $email, $list_id, $merge_vars, $result, $checkbox, $type, $related_object_id );
- The following example is for adding a hook callback.
- // define the mc4wp_subscribe callback
- function action_mc4wp_subscribe( $email, $list_id, $merge_vars, $result, $checkbox, $type, $related_object_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'mc4wp_subscribe', 'action_mc4wp_subscribe', 10, 7 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'mc4wp_subscribe', 'action_mc4wp_subscribe', 10, 7 );
Defined (2)
The action is defined in the following location(s).
- /includes/integrations/class-integration.php
- do_action( 'mc4wp_subscribe', $email, $list_id, $merge_vars, $result, 'checkbox', $type, $related_object_id );
- /includes/class-subscribe-request.php
- do_action( 'mc4wp_subscribe', $this->user_data['EMAIL'], $list_id, $list_merge_vars, $result, 'form', 'form', 0 );