Created
June 23, 2022 09:13
-
-
Save patrickposner/ed843e88702f2f7554f3d7f7282be920 to your computer and use it in GitHub Desktop.
Fire webhook after static export is done.
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 | |
add_action('ss_after_cleanup', function(){ | |
// Get options from Simply Static. | |
$options = get_option( 'simply-static' ); | |
$basic_auth = $options['http_basic_auth_digest']; | |
// Prepare URL and data. | |
$url = 'https://test.com'; | |
$data = []; | |
$response = wp_remote_post( $url, array( | |
'body' => $data, | |
'headers' => array( | |
'Authorization' => 'Basic ' . $basic_auth ), | |
), | |
) ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment