Get started

This plugin extends the possibilities of WP Webhooks Pro by allowing you to execute PHP code via any kind of webhook.
This enables you to do basically everything on your website using just webhooks.

IMPORTANT: This is an advanced extension. Use it only if you know what you are doing. We also recommend activating the whitelist of WP Webhooks Pro.

How to use it

  1. Upload the zip file to your WordPress site (Plugins > Add New > Upload)
  2. Activate the plugin
  3. Go to Settings > WP Webhooks Pro -> Settings
  4. Scroll down and activate the action “execute_php_code” and click Save
  5. Go to Recieve Data and start implementing the webhook

Now just copy the specified webhook you want to use for that (The link with the long API key at the end) and head over to your webhook handler.

In this example, we will demonstrate the usage using Zapier.

On Zapier you can create a new Zap, setup your needed trigger and add a new action. For the action you can choose from the built-in apps the app Webhooks.

Now you are prompted to choose a Zapier Webhook. Choose POST or Custom Request and click “Save and continue” (In this example we cover POST)

On the next page, you need to include an URL. Please include there your webhook URL from your websites “Recieve Data” page.

For the Payload type, you can choose between Form, XML or JSON. You can also use plain text or html. Please see for more information.

After including the URL and checking the Payload Type, scroll down and set the following button to no: Unflatten 

Now you can scroll up again and place your actions into the Data fields.
As an action, you can choose execute_php_code. For the php_code field, you can include your specified PHP code.

Now you can click save and finish the setup! After you set up your Zap, don’t forget to activate it.

Updated on February 23, 2019

Was this article helpful?