verygoodplugins

Untitled

Jan 20th, 2021
665
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 );
RAW Paste Data