Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created July 13, 2021 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewlimaza/b1bd929e72eee619eb28c368fb5311a3 to your computer and use it in GitHub Desktop.
Save andrewlimaza/b1bd929e72eee619eb28c368fb5311a3 to your computer and use it in GitHub Desktop.
Custom WP Zapier webhook example
<?php
/**
* Looks for a custom variable passed to WP Zapier. Adjust custom-var in your Zapier data (key/data pair)
* Add this code to your site by following this guide - https://yoohooplugins.com/customize-wordpress/
*/
function my_own_webhook_2() {
$custom_identifier = $_REQUEST['custom-var'];
// If this custom identifier isn't present, bail.
if ( ! $custom_identifier ) {
return;
}
// Do custom code here for this custom event.
}
add_action( 'wp_zapier_custom_webhook', 'my_own_webhook_2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment