Created
December 12, 2025 13:23
-
-
Save dexit/ae6c5749cddbc569becc587b75f98903 to your computer and use it in GitHub Desktop.
request_args elementor form webhooks access the meta without email action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @param array $args Webhook request arguments. | |
| * @param Form_Record $record An instance of the form record. | |
| */ | |
| add_filter( 'elementor_pro/forms/webhooks/request_args', function( $args, $record ) { | |
| $meta_keys = [ | |
| 'date', | |
| 'time', | |
| 'page_url', | |
| 'page_title', | |
| 'user_agent', | |
| 'remote_ip', | |
| 'credit', | |
| ]; | |
| $result = $record->get_form_meta( $meta_keys ); | |
| $args['body']['meta'] = array_merge( $args['body']['meta'], $result ); | |
| return $args; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment