Advertisement
verygoodplugins

Untitled

Jan 20th, 2021
1,017
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. function verify_secure_webhook() {
  2.  
  3.     if ( isset( $_GET['cid'] ) ) {
  4.  
  5.         $hash = md5( $_GET['cid'] . wp_fusion()->settings->get( 'access_key' ) );
  6.  
  7.         if ( $hash !== $_GET['scid'] ) {
  8.             wp_die( 'Invalid.' );
  9.         }
  10.  
  11.     }
  12.  
  13. }
  14.  
  15. add_action( 'init', 'verify_secure_webhook', 5 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement