-
-
Save crisgaret/624629a0877b49123ff03c40163791d1 to your computer and use it in GitHub Desktop.
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 | |
| /* | |
| Plugin Name: Ninja Forms - Webhooks Auth Headers | |
| */ | |
| add_filter( 'nf_remote_post_args', 'nf_wh_add_auth' ); | |
| function nf_wh_add_auth( $args ){ | |
| $headers = array( | |
| 'headers' => array( | |
| 'Authorization' => 'Basic ' . base64_encode( YOUR_USERNAME . ':' . YOUR_PASSWORD ) | |
| ) | |
| ); | |
| $args = array_merge( $args, $headers ); | |
| return $args; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment