Receive Data From WP Webhooks

Use the webhook URL down below to connect your external service with your site. This URL receives data from external endpoints and does certain actions on your WordPress site. Please note, that deleting the default main webhook creates automatically a new one. If you need more information, check out the installation and documentation by clicking here.
Webhook Name Webhook URL Webhook API Key Action

Add Webhook

Available Webhook Actions

Below you will find a list of all available actions when sending data from your specified service to WordPress.
Create a new user via webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_user
  • user_emailRequired
    This field is required. Include the email for the user.
  • first_name
    The first name of the user.
  • last_name
    The last name of the user.
  • nickname
    The nickname. Please note that the nickname will be sanitized by WordPress automatically.
  • user_login
    A string with which the user can log in to your site.
  • display_name
    The name that will be seen on the frontend of your site.
  • user_nicename
    A URL-friendly name. Default is user' username.
  • description
    A description for the user that will be available on the profile page.
  • rich_editing
    Wether the user should be able to use the Rich editor. Set it to "yes" or "no". Default "no".
  • user_registered
    The date the user gets registered. Date structure: Y-m-d H:i:s
  • user_url
    Include a website url.
  • role
    The main user role. If not set, default is subscriber.
  • additional_roles
    This allows to add multiple roles to a user. For more information, please read the description.
  • user_pass
    The user password. If not defined, we generate a 32 character long password dynamically.
  • send_email
    Set this field to "yes" to send a email to the user with the data.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the user id with the key "user_id" and the user data with the key "user_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'data' => array(
        'user_id' => 0,
        'user_data' => array()
    )
);
        

This webhook action is used to create a user on your WordPress system via a webhook call.
The description is uniquely made for the create_user webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use create_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to create_user.
  2. It is also required to set an email address using the argument user_email. This should be the email address of the user you want to create.
  3. All the other arguments are optional and just extend the creation of the user. We would still recommend to set the attribute user_login, since this will be the name a user can log in with.


Special Arguments


role
The slug of the role. The default roles have the following slugs: administrator, editor, author, contributor, subscriber

additional_roles
This argument allows you to add or remove additional roles on the user. There are two possible ways of doing that:
  1. String method
    This method allows you to add or remove the user roles using a simple string. To make it work, simply add the slug of the role and define the action (add/remove) after, separated by double points (:). If you want to add multiple roles, simply separate them with a semicolon (;). Please refer to the example down below.
    editor:add;custom-role:add;custom-role-1:remove
  2. JSON method
    We also support a JSON formatted string, which contains the role slug as the JSON key and the action (add/remove) as the value. Please refer to the example below:
    {
      "editor": "add",
      "custom-role": "add",
      "custom-role-1": "remove"
    }

user_meta
This argument is specifically designed to add/update or remove user meta to your updated user.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the user meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the user meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single user meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the user_meta argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three user meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the user_meta argument, needs to be escaped.

send_email
In case you set the send_email argument to yes, we will send an email from this WordPress site to the user email, containing his login details.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the create_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $user_data, $user_id, $user_meta, $update ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $user_data (array)
    Contains the data that is used to create the user.
  2. $user_id (integer)
    Contains the user id of the newly created user. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $user_meta (string)
    Contains the unformatted user meta as you sent it over within the webhook request as a string.
  4. $update (bool)
    This value will be set to 'false' for the create_user webhook.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Delete a user via WP Webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_user
  • user_idRequired
    (Optional if user_email is defined) Include the numeric id of the user.
  • user_emailRequired
    (Optional if user_email is defined) Include the assigned email of the user.
  • send_email
    Set this field to "yes" to send a email to the user that the account got deleted.
  • remove_from_network
    Set this field to "yes" to delete a user from the whole network. WARNING: This will delete all posts authored by the user. Default: "no"
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the user id with the key "user_id" and the user delete success boolean with the key "user_deleted". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array(
        'user_deleted' => false,
        'user_id' => 0
    )
);
        

This webhook action is used to delete a user on your WordPress system via a webhook call.
This description is uniquely made for the delete_user webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use delete_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to delete_user.
  2. It is also required to set either the email or the user id of the user you want to delete. You can do that by using the user_id or user_email argument.
  3. All the other arguments are optional and just extend the deletion of the user.
  4. Please note that deleting a user inside of a multisite network without setting the remove_from_network argument, just deletes the user from the current site, but not from the whole network.


Special Arguments


send_email
In case you set the send_email argument to yes, we will send an email from this WordPress site to the user email, containing the notice of the deleted account.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the delete_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $user, $user_id, $user_email, $send_email ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $user (object)
    Contains the WordPress user object.
  2. $user_id (integer)
    Contains the user id of the deleted user. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $user_email (string)
    Contains the user email.
  4. $send_email (string)
    Returns either yes or no, depending on your settings for the send_email argument.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Search for users on your WordPress website
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_users
  • argumentsRequired
    A string containing a JSON construct in the WP_User_Query notation. Please check the description for more information.
  • return_only
    Define the data you want to return. Please check the description for more information. Default: get_results
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the user query. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch one or multiple users from your WordPress system via a webhook call.
This description is uniquely made for the get_users webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_users

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_users.
  2. It is also required to set the argument arguments, which contains a JSON formatted string with the parameters used to identify the users.
  3. All the other arguments are optional and just extend the fetching of the users.


Special Arguments


arguments
This argument contains a JSON formatted string, which includes certain arguments from the WordPress user query called WP_User_Query. For further details, please check out the following link:
https://codex.wordpress.org/Class_Reference/WP_User_Query
Here is an example on how the JSON is set up:
{"search":"Max","number":5}
The example above will filter the users for the name "Max" and returns maximum five users with that name.

return_only
You can also manipulate the output of the query using the return_only parameter. This allows you to, for example, output either only the search results, the total count, the whole query object or any combination in between. Here is an example that returns all of the data:
get_total,get_results,all,meta_data
The all argument returns the whole WP_Query object, but not the results of the query. If you want the results of the query, you can use the get_results value. To use the meta_data setting, you also need to set the get_results key since the meta data will be attached to every user entry.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_users action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $user_query, $args, $return_only ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $user_query (object)
    The full WP_User_Query object.
  3. $args (string)
    The string formatted JSON construct that was sent by the caller within the arguments argument.
  4. $return_only (string)
    The string that was sent by the caller via the return_only argument.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Returns the object of a user
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_user
  • user_valueRequired
    The user id of the user. You can also use certain other values. Please check the descripton for more details.
  • value_type
    You can choose between certain value types. Possible: id, slug, email, login
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the user qury. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch a single users from your WordPress system via a webhook call.
It uses the WordPress function get_user_by() to fetch the user from the database. To learn more about this function, please check the official WordPress docs:https://developer.wordpress.org/reference/functions/get_user_by/

This description is uniquely made for the get_user webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_user

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_user.
  2. It is also required to set the argument user_value, which by default is the user id. You can also use other values like the email or the login name (But for doing so, please read the next step).
  3. In case you want to use e.g. the email instead of the user id, you need to set the argument value_type to email. Further details are down below within the Special Arguments description.
  4. All the other arguments are optional and just extend the fetching of the user.


Special Arguments


value_type
This argument is used to change the data you can add within the user_value argument. Possible values are: id, ID, slug, email, login

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_user action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $user_value, $value_type, $user ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $user_value (string)
    The value you included into the user_value argument.
  3. $value_type (string)
    The value you included into the value_type argument.
  4. $user (mixed)
    Returns null in case an the user_value wasn't set, the user object on success or a wp_error object in case an error occurs.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Insert/Create a post. You have all functionalities available from wp_insert_post
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_post
  • post_author
    (mixed) The ID or the email of the user who added the post. Default is the current user ID.
  • post_date
    (string) The date of the post. Default is the current time. Format: 2018-12-31 11:11:11
  • post_date_gmt
    (string) The date of the post in the GMT timezone. Default is the value of $post_date.
  • post_content
    (string) The post content. Default empty.
  • post_content_filtered
    (string) The filtered post content. Default empty.
  • post_title
    (string) The post title. Default empty.
  • post_excerpt
    (string) The post excerpt. Default empty.
  • post_status
    (string) The post status. Default 'draft'.
  • post_type
    (string) The post type. Default 'post'.
  • comment_status
    (string) Whether the post can accept comments. Accepts 'open' or 'closed'. Default is the value of 'default_comment_status' option.
  • ping_status
    (string) Whether the post can accept pings. Accepts 'open' or 'closed'. Default is the value of 'default_ping_status' option.
  • post_password
    (string) The password to access the post. Default empty.
  • post_name
    (string) The post name. Default is the sanitized post title when creating a new post.
  • to_ping
    (string) Space or carriage return-separated list of URLs to ping. Default empty.
  • pinged
    (string) Space or carriage return-separated list of URLs that have been pinged. Default empty.
  • post_parent
    (int) Set this for the post it belongs to, if any. Default 0.
  • menu_order
    (int) The order the post should be displayed in. Default 0.
  • post_mime_type
    (string) The mime type of the post. Default empty.
  • guid
    (string) Global Unique ID for referencing the post. Default empty.
  • import_id
    (integer) In case you want to give your post a specific post id, please define it here. See the description for further details.
  • post_category
    (string) A comma separated list of category names, slugs, or IDs. Defaults to value of the 'default_category' option. Example: cat_1,cat_2,cat_3
  • tags_input
    (string) A comma separated list of tag names, slugs, or IDs. Default empty.
  • tax_input
    (string) A simple or JSON formatted string containing existing taxonomy terms. Default empty. More details within the description.
  • wp_error
    Whether to return a WP_Error on failure. Posible values: "yes" or "no". Default value: "no".
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) User related data as an array. We return the post id with the key "post_id" and the post data with the key "post_data". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success'   => false,
    'msg'       => '',
    'data'      => array(
        'post_id' => null,
        'post_data' => null
    )
);
        

This webhook action is used to create a post on your WordPress system via a webhook call.
The description is uniquely made for the create_post webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use create_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to create_post.
  2. All the other arguments are optional and just extend the creation of the post. We would still recommend to set the attribute post_title, to make recognizing it easy, as well as for creating proper permalinks/slugs.


Tipps

  1. In case you want to create a post for a custom post type, you can do that by using the post_type argument.
  2. By default, we create each post in a draft state. If you want to directly publish a post, use the post_status argument and set it to publish.
  3. In case you want to set a short description for your post, you can use the post_excerpt argument.


Special Arguments


post_author
The post author argument accepts either the user id of a user, or the email address of an existing user. In case you choose the email adress, we try to match it with the users on your WordPress site. In case we couldn't find a user for the given email, we leave the field empty.

post_content
The post content is the main content area of the post. It can contain HTML or any other kind of content necessary for your functionality.

post_status
The post status defines further details about how your post will be treated. By default, WordPress offers the following post statuses: draft, pending, private, publish. Please note that other plugins can extend the post status values to offer a bigger variety, e.g. Woocommerce.

post_type
The post type determines to which group of posts your currently created post belongs. Please use the slug of the post type to assign it properly.

import_id
This argument allows you to define a suggested post ID for your post. In case the ID is already taken, the post will be created using the default behavior by asigning automatically an ID.

tags_input
This argument supports the default tags_input variable of the wp_insert_post() function. Please use this function only if you are known to its functionality since WordPress might not add the values properly due to permissions. If you are not sure, please use the tax_input argument instead.

Here is an example:
342,5678,2
This argument supports a comma separated list of tag names, slugs, or IDs.

tax_input
This argument allows you to add/append/delete any kind of taxonomies on your post. It uses a custom functionality that adds the taxonomies independently of the wp_update_post() function.
To make it work, we offer certain different features and methods to make the most out of the taxonomy management. Down below, you will find further information about the whole functionality.
  1. String method
    This method allows you to add/update/delete or bulk manage the post taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too. In case you use more complex taxonomies that use semicolons or double points within the slugs, you need to use the JSON method.
    • Replace existing taxonomy items
      This method allows you to replace already existing taxonomy items on the post. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      taxonomy_1,tax_item_1:tax_item_2:tax_item_3;taxonomy_2,tax_item_5:tax_item_7:tax_item_8
      To separate the taxonomies from the single taxonomy items, please use a comma ",". In case you want to add multiple items per taxonomy, you can separate them via a double point ":". To separate multiple taxonomies from each other, please separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all; in front of a semicolon-separated list of the taxonomies you want to remove all items for. Here is an example:
      ironikus-remove-all;taxonomy_1;taxonomy_2
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. Here is an example:
      ironikus-append;taxonomy_1,value_1:value_2-ironikus-delete:value_3;taxonomy_2,value_5:value_6:value_7-ironikus-delete
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2. We also add the taxonomy items value_1, value_3, value_5 and value_6. We also remove the taxonomy items value_2 and value_7.
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append; at the beginning of the string.
      ironikus-append;taxonomy_1,value_1:value_2:value_3;taxonomy_2,value_1:value_2:value_3
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2 with multiple taxonomy items on the post. The already assigned ones won't be replaced.
  2. JSON method
    This method allows you to add/update/delete or bulk manage the post taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too.
    • Replace existing taxonomy items
      This JSON allows you to replace already existing taxonomy items on the post. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      {
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog",
          "male",
          "simple"
        ]
      }
      The key on the first layer of the JSON is the slug of the taxonomy. As a value, it accepts multiple slugs of the single taxonomy terms. To add multiple taxonomies, simply append them on the first layer of the JSON.
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all as a separate value with the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. Here is an example:
      {
        "wpwhtype": "ironikus-remove-all",
        "category": [],
        "post_tag": []
      }
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append to the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. All the taxonomies you add after, will be added to the existing ones on the post.
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog"
        ]
      }
      In the example above, we append the taxonomies category and post_tag with multiple taxonomy items on the post. The already assigned ones won't be replaced.
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. To do that, simply append -ironikus-delete at the end of the taxonomy term slug. This specific taxonomy term will then be removed from the post. Here is an example:
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category-ironikus-delete"
        ],
        "post_tag": [
          "dog-ironikus-delete"
        ]
      }
      In the example above, we append the taxonomies category and post_tag. We also add the taxonomy item test-category. We also remove the taxonomy items second-category and dog.

meta_input
This argument is specifically designed to add/update or remove post meta to your created post.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the post meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the post meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single post meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the meta_input argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three post meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the meta_input argument, needs to be escaped.

wp_error
In case you set the wp_error argument to yes, we will return the WP Error object within the response if the webhook action call. It is recommended to only use this for debugging.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the create_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post_data, $post_id, $meta_input, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post_data (array)
    Contains the data that is used to create the post and some additional data as the meta input.
  2. $post_id (integer)
    Contains the post id of the newly created post. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $meta_input (string)
    Contains the unformatted post meta as you sent it over within the webhook request as a string.
  4. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Delete a post via WP Webhooks.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_post
  • post_idRequired
    The post id of your specified post. This field is required.
  • force_delete
    (optional) Whether to bypass trash and force deletion (added in WordPress 2.9). Possible values: "yes" and "no". Default: "no". Please note that soft deletion just works for the "post" and "page" post type.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) Post related data as an array. We return the post id with the key "post_id" and the force delete boolean with the key "force_delete". E.g. array( 'data' => array(...) )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'data' => array(
        'post_id' => 0,
        'force_delete' => false
    )
);
        

This webhook action is used to delete a post on your WordPress system via a webhook call.
This description is uniquely made for the delete_post webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use delete_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to delete_post.
  2. It is also required to set the post id of the post you want to delete. You can do that by using the post_id argument.
  3. All the other arguments are optional and just extend the deletion of the post.
  4. Please note that deleting a post without defining the force_delete argument, only moves default posts and pages to the trash (wherever applicable) - otherwise they will be directly deleted.


Special Arguments


force_delete
In case you set the force_delete argument to yes, the post will be completely removed from your WordPress website.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the delete_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post, $post_id, $check, $force_delete ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post (object)
    Contains the WordPress post object of the already deleted post.
  2. $post_id (integer)
    Contains the post id of the deleted post.
  3. $check (mixed)
    Contains the response of the wp_delete_post() function.
  4. $force_delete (string)
    Returns either yes or no, depending on your settings for the force_delete argument.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Search for posts on your WordPress website
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_posts
  • argumentsRequired
    A string containing a JSON construct in the WP_Query notation. Please check the description for more information.
  • return_only
    Define the data you want to return. Please check the description for more information. Default: posts
  • load_meta
    Set this argument to "yes" to add the post meta to each given post. Default: "no"
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the post query. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch one or multiple posts from your WordPress system via a webhook call.
This description is uniquely made for the get_posts webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_posts

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_posts.
  2. It is also required to set the argument arguments, which contains a JSON formatted string with the parameters used to identify the posts. More details about that is available within the Special Arguments list.
  3. All the other arguments are optional and just extend the fetching of the posts.


Special Arguments


arguments
This argument contains a JSON formatted string, which includes certain arguments from the WordPress post query called WP_Query. For further details, please check out the following link:
https://developer.wordpress.org/reference/classes/wp_query/
Here is an example on how the JSON is set up:
{"post_type":"post","posts_per_page":8}
The example above will filter the posts for the post type "post" and returns maximum eight posts.

return_only
You can also manipulate the output of the query using the return_only parameter. This allows you to output only certain elements or the whole WP_Query class. Here is an example:
posts,post_count,found_posts,max_num_pages
Here's a list of all available values for the return_only argument. In case you want to use multiple ones, simply separate them with a comma.
  1. all
  2. posts
  3. post
  4. post_count
  5. found_posts
  6. max_num_pages
  7. current_post
  8. query_vars
  9. query
  10. tax_query
  11. meta_query
  12. date_query
  13. request
  14. in_the_loop
  15. current_post

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_posts action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $post_query, $args, $return_only ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $post_query (object)
    The full WP_Query object.
  3. $args (string)
    The string formatted JSON construct that was sent by the caller within the arguments argument.
  4. $return_only (string)
    The string that was sent by the caller via the return_only argument.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Returns the object of a user
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to get_post
  • post_idRequired
    The post id of the post you want to fetch.
  • return_only
    Select the values you want to return. Default is all. Please see the description for more details.
  • thumbnail_size
    Pass the size of the thumbnail of your given post id. Default is full. Please see the description for more details.
  • post_taxonomies
    Single value or comma separated list of the taxonomies you want to return. Default: post_tag. Please see the description for more details.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    The data construct of the single post. This depends on the parameters you send.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg'     => '',
    'data' => array()
);
        

This webhook action is used to fetch a single post from your WordPress system via a webhook call. It uses the default WordPress function get_post():
https://developer.wordpress.org/reference/functions/get_post/

This description is uniquely made for the get_post webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use get_post

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to get_post.
  2. It is also required to set the argument post_id, which contains the id of the post you want to fetch.
  3. All the other arguments are optional and just extend the fetching of the post.


Special Arguments


return_only
You can also manipulate the result of the post data gathering using the return_only parameter. This allows you to output only certain elements of the request. Here is an example:
post,post_thumbnail,post_terms,post_meta,post_permalink
Here's a list of all available values for the return_only argument. In case you want to use multiple ones, simply separate them with a comma.
  1. all
  2. post
  3. post_thumbnail
  4. post_terms
  5. post_meta
  6. post_permalink

thumbnail_size
This argument allows you to return one or multiple thumbnail_sizes for the given post thumbnail. By default, we output only the full image. Here is an example:
full,medium
Here's a list of all available sizes for the thumbnail_size argument (The availalbe sizes may vary since you can also use third-party size definitions). In case you want to use multiple ones, simply separate them with a comma.
  1. thumbnail (150px square)
  2. medium (maximum 300px width and height)
  3. large (maximum 1024px width and height)
  4. full (full/original image size you uploaded)

post_taxonomies
You can also customize the output of the returned taxonomies using the post_taxonomies argument. Default is post_tag. This argument accepts a string of a single taxonomy slug or a comma separated list of multiple taxonomy slugs. Please see the example down below:
post_tag,custom_taxonomy_1,custom_taxonomy_2

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the get_post action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $return_args, $post_id, $thumbnail_size, $post_taxonomies ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $return_args (array)
    All the values that are sent back as a response the the initial webhook action caller.
  2. $post_id (integer)
    The id of the currently fetched post.
  3. $thumbnail_size (string)
    The string formatted thumbnail sizes sent by the caller within the thumbnail_size argument.
  4. $post_taxonomies (string)
    The string formatted taxonomy slugs sent by the caller within the post_taxonomies argument.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Do whatever you like with the incoming data by defining this custom action.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to custom_action
  • wpwh_identifier
    This value is send over within the WordPress hooks to identify the incoming action. You can use it to fire your customizatios only on specific webhooks. For more information, please check the description.
  • custom
    This webhook returns whatever you define withiin the filters. Please check the description for more detials.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

//This is how the default response looks like
$return_args = array(
    'success' => false,
    'msg' => ''
);
        

This webhook action is used to fire a custom wordpress filter within your WordPress system via a webhook call. You can use it to fully cusotmize the webhook logic for your needs.
This description is uniquely made for the custom_action webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use custom_action

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to custom_action.
  2. All the other arguments are optional and just extend the custom execution of the action.
To modify your incoming data based on your needs, you simply create a custom add_filter() call within your theme or plugin. Down below is an example on how you can do that:
add_filter( 'wpwhpro/run/actions/custom_action/return_args', 'wpwh_fire_my_custom_logic', 10, 3 );
function wpwh_fire_my_custom_logic( $return_args, $identifier, $response_body ){

	//If the identifier doesn't match, do nothing
	if( $identifier !== 'ilovewebhooks' ){
		return $return_args;
	}

	//This is how you can validate the incoming value. This field will return the value for the key user_email
	$email = WPWHPRO()->helpers->validate_request_value( $response_body['content'], 'user_email' );

	//Include your own logic here....

	//This is what the webhook returns back to the caller of this action (response)
	//By default, we return an array with success => true and msg -> Some Text
	return $return_args;

}
The custom add_filter() callback accepts three parameters, which are explained down below:
  1. $return_args (array)
    This is what the webhook call returns as a response. You can modify it to return your own custom data.
  2. $identifier (string)
    This is the wpwh_identifier you may have set up within the webhook call. (We also allow to set this specific argument within the URL as &wpwh_identifier=my_identifier). Further information about this argument is available within the Special Arguments list.
  3. $response_body (array)
    This returns the validated payload of the incoming webhook call. You can use WPWHPRO()->helpers->validate_request_value() to validate single entries (See example)

Tipp

Since this webhook action requires you to still set the action as mentioned above (to let our plugin know you want to fire a custom_action), you can also set the action parameter within the webhook URL you define within your external endpoint (instead of within the body). E.g.: &action=custom_action - This way you can avoid modifying the webhook request payload in the first place.

Special Arguments


wpwh_identifier
Set this argument to identify your webhook call within the add_filter() function. It can be used to diversify between multiple calls that use this custom action. You can set it to e.g. validate-user and then check within the add_filter() callback against it to only fire it for this specific webhook call. You can also define this argument within the URL as a parameter, e.g. &wpwh_identifier=my-custom-identifier. In case you have defined the wpwh_identifier within the payload and the URL, we prioritize the parameter set within the payload.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Test a webhooks functionality. (Advanced)
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to ironikus_test
  • test_varRequired
    A test var. Include the following value to get a success message back: test-value123
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • test_var
    (string) The variable that was set for the request.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
    'success' => false,
    'msg' => '',
    'test_var' => 'test-value123'
);
        

This webhook action is only used for testing purposes to test if WP Webhooks works properly on your WordPress website.
This description is uniquely made for the ironikus_test webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use ironikus_test

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to ironikus_test.
  2. The second argument you need to set is test_var. Please set it to test-value123

Tipp

This webhook makes sense if you want to test if WP Webhooks works properly on your WordPress website. You can try to setup different values to see how the webhook interacts with your site.
You can also use it to test the functionality using our Ironikus assistant:https://ironikus.com/assistant/
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Creates a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to create_comment
  • comment_agent
    (string) The HTTP user agent of the comment_author when the comment was submitted. Default empty.
  • comment_approved
    (int|string) Whether the comment has been approved. Default 1.
  • comment_author
    (string) The name of the author of the comment. Default empty.
  • comment_author_email
    (string) The email address of the $comment_author. Default empty.
  • comment_author_IP
    (string) The IP address of the $comment_author. Default empty.
  • comment_author_url
    (string) The URL address of the $comment_author. Default empty.
  • comment_content
    (string) The content of the comment. Default empty.
  • comment_date
    (string) The date the comment was submitted. To set the date manually, comment_date_gmt must also be specified. Default is the current time.
  • comment_date_gmt
    (string) The date the comment was submitted in the GMT timezone. Default is comment_date in the site's GMT timezone.
  • comment_karma
    (int) The karma of the comment. Default 0.
  • comment_parent
    (int) ID of this comment's parent, if any. Default 0.
  • comment_post_ID
    (int) ID of the post that relates to the comment, if any. Default 0.
  • comment_type
    (string) Comment type. Default empty.
  • comment_meta
    (array) Optional. Array of key/value pairs to be stored in commentmeta for the new comment. More info within the description.
  • user_id
    (int) ID of the user who submitted the comment. Default 0.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The data related to the comment, as well as the user and the post object, incl. the meta values.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0,
		'comment_data'  => array(),
		'comment_meta'  => array(),
		'current_post_id' => 0,
		'current_post_data' => array(),
		'current_post_data_meta' => array(),
		'user_id' => 0,
		'user_data' => array(),
		'user_data_meta' => array()
	),
);
        

This hook enables you to create a comment with all of its settings.

You can also add custom post meta. Here is an example on how this would look like using the simple structure (We also support json):



meta_key_1,meta_value_1;my_second_key,add_my_value


To separate the meta from the value, you can use a comma ",". To separate multiple meta settings from each other, easily separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)

This is an example on how you can include the post meta using JSON.
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!"
}
				

For security reasons, we don't send the password within the webhook response. To send the password as well, you can check out the following filter: wpwhpro/webhooks/action_create_comment_restrict_user_values

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Updates a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to update_comment
  • comment_IDRequired
    (string) The HTTP user agent of the comment_author when the comment was submitted. Default empty.
  • comment_agent
    (string) The HTTP user agent of the comment_author when the comment was submitted. Default empty.
  • comment_approved
    (int|string) Whether the comment has been approved. Default 1.
  • comment_author
    (string) The name of the author of the comment. Default empty.
  • comment_author_email
    (string) The email address of the $comment_author. Default empty.
  • comment_author_IP
    (string) The IP address of the $comment_author. Default empty.
  • comment_author_url
    (string) The URL address of the $comment_author. Default empty.
  • comment_content
    (string) The content of the comment. Default empty.
  • comment_date
    (string) The date the comment was submitted. To set the date manually, comment_date_gmt must also be specified. Default is the current time.
  • comment_date_gmt
    (string) The date the comment was submitted in the GMT timezone. Default is comment_date in the site's GMT timezone.
  • comment_karma
    (int) The karma of the comment. Default 0.
  • comment_parent
    (int) ID of this comment's parent, if any. Default 0.
  • comment_post_ID
    (int) ID of the post that relates to the comment, if any. Default 0.
  • comment_type
    (string) Comment type. Default empty.
  • comment_meta
    (array) Optional. Array of key/value pairs to be stored in commentmeta for the new comment. More info within the description.
  • user_id
    (int) ID of the user who submitted the comment. Default 0.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The data related to the comment, as well as the user and the post object, incl. the meta values.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0,
		'comment_data'  => array(),
		'comment_meta'  => array(),
		'current_post_id' => 0,
		'current_post_data' => array(),
		'current_post_data_meta' => array(),
		'user_id' => 0,
		'user_data' => array(),
		'user_data_meta' => array()
	),
);
        

This hook enables you to update a comment with all of its settings.

You can also add custom post meta. Here is an example on how this would look like using the simple structure (We also support json):



meta_key_1,meta_value_1;my_second_key,add_my_value


To separate the meta from the value, you can use a comma ",". To separate multiple meta settings from each other, easily separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)

This is an example on how you can include the post meta using JSON. (If you set the meta value to "ironikus-delete", it will remove the existing value.)
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "another_meta_key_1": "ironikus-delete"
}
				

For security reasons, we don't send the password within the webhook response. To send the password as well, you can check out the following filter: wpwhpro/webhooks/action_update_comment_restrict_user_values

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Trash a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to trash_comment
  • comment_idRequired
    (int) The comment id of the comment you want to trash.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The comment id as comment_id.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0
	),
);
        

This hook enables you to trash a comment with all of its settings.

We only support the comment id. Json objects are not allowed.

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
Delete a comment using a webhook.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to delete_comment
  • comment_idRequired
    (int) The comment id of the comment you want to delete.
  • force_delete
    (string) Wether you want to bypass the trash or not. You can set this value to "yes" or "no". Default "no"
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • data
    (array) The comment id as comment_id and the force_delete status.
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

$return_args = array(
	'success' => false,
	'msg' => '',
	'data' => array(
		'comment_id'   => 0,
		'force_delete'   => 'no'
	),
);
        

This hook enables you to delete a comment with all of its settings.

Please note, that this function, by default, pushes the comment to the trash. In case you want to fully delete it, set force_delete to "yes".

Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to create a download within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_create_download
  • price
    (float) The price of the download you want to use. Format: 19.99
  • is_variable_pricing
    (string) Set this value to "yes" if you want to activate variable pricing for this product. Default: no
  • variable_prices
    (string) A JSON formatted string, containing all of the variable product prices. Please see the description for further details.
  • default_price_id
    (integer) The ID of the price variation you want to use as the default price.
  • download_files
    (String) A JSON formatted string containing all of the downloable file. Please see the description for further details.
  • bundled_products
    (String) A JSON formatted string, containing all of the bundled products. Please see the description for further details.
  • bundled_products_conditions
    (String) A JSON formatted string that contains the price dependencies. Please see the description for further details.
  • increase_earnings
    (Float) The price you would like to increase the lifetime earnings of this product. Please see the description for further details.
  • decrease_earnings
    (Float) The price you would like to decrease the lifetime earnings of this product. Please see the description for further details.
  • increase_sales
    (Integer) Increase the number of sales from a statistical point of view. Please see the description for further details.
  • decrease_sales
    (Integer) Decrease the number of sales from a statistical point of view. Please see the description for further details.
  • hide_purchase_link
    (String) Set this string to "yes" to hide the purchase button under the download. Please see the description for more details.
  • download_limit
    (Integer) Limits how often a customer can globally download the purchase. Please see the description for further details.
  • download_author
    (mixed) The ID or the email of the user who added the post. Default is the current user ID.
  • download_date
    (string) The date of the post. Default is the current time. Format: 2018-12-31 11:11:11
  • download_date_gmt
    (string) The date of the post in the GMT timezone. Default is the value of $post_date.
  • download_content
    (string) The post content. Default empty.
  • download_content_filtered
    (string) The filtered post content. Default empty.
  • download_title
    (string) The post title. Default empty.
  • download_excerpt
    (string) The post excerpt. Default empty.
  • download_status
    (string) The post status. Default 'draft'.
  • comment_status
    (string) Whether the post can accept comments. Accepts 'open' or 'closed'. Default is the value of 'default_comment_status' option.
  • ping_status
    (string) Whether the post can accept pings. Accepts 'open' or 'closed'. Default is the value of 'default_ping_status' option.
  • download_password
    (string) The password to access the post. Default empty.
  • download_name
    (string) The post name. Default is the sanitized post title when creating a new post.
  • to_ping
    (string) Space or carriage return-separated list of URLs to ping. Default empty.
  • pinged
    (string) Space or carriage return-separated list of URLs that have been pinged. Default empty.
  • download_parent
    (int) Set this for the post it belongs to, if any. Default 0.
  • menu_order
    (int) The order the post should be displayed in. Default 0.
  • download_mime_type
    (string) The mime type of the post. Default empty.
  • guid
    (string) Global Unique ID for referencing the post. Default empty.
  • download_category
    (string) A comma separated list of category names, slugs, or IDs. Defaults to value of the 'default_category' option. Example: cat_1,cat_2,cat_3
  • tags_input
    (string) A comma separated list of tag names, slugs, or IDs. Default empty.
  • tax_input
    (string) A simple or JSON formatted string containing existing taxonomy terms. Default empty. More details within the description.
  • meta_input
    (string) A json or a comma and semicolon separated list of post meta values keyed by their post meta key. Default empty. More info in the description.
  • wp_error
    Whether to return a WP_Error on failure. Posible values: "yes" or "no". Default value: "no".
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • data
    (array) Within the data array, you will find further details about the response, as well as the payment id and further information.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "Download successfully created",
    "data": {
        "download_id": 797,
        "download_data": {
            "post_type": "download",
            "meta_data": "{\n  \"meta_key_1\": \"This is my meta value 1\",\n  \"another_meta_key\": \"This is my second meta key!\",\n  \"third_meta_key\": \"ironikus-serialize{\\\"price\\\": \\\"100\\\"}\"\n}",
            "tax_input": false,
            "edd": {
                "increase_earnings": "25.49",
                "decrease_earnings": false,
                "increase_sales": "15",
                "decrease_sales": false,
                "edd_price": "11.11",
                "is_variable_pricing": 1,
                "edd_variable_prices": "{\n    \"1\": {\n        \"index\": \"1\",\n        \"name\": \"Variation 1\",\n        \"amount\": \"39.90\",\n        \"license_limit\": \"0\",\n        \"is_lifetime\": \"1\"\n    },\n    \"2\": {\n        \"index\": \"2\",\n        \"name\": \"Variation 2\",\n        \"amount\": \"49.90\",\n        \"license_limit\": \"4\"\n    }\n}",
                "default_price_id": "2",
                "edd_download_files": "{\n    \"1\": {\n        \"index\": \"0\",\n        \"attachment_id\": \"\",\n        \"thumbnail_size\": \"\",\n        \"name\": \"wp-webhooks-pro-\",\n        \"file\": \"https:\\/\\/domain.demo\\/wp-content\\/uploads\\/edd\\/2020\\/02\\/wp-webhooks-pro.zip\",\n        \"condition\": \"all\"\n    }\n}",
                "edd_bundled_products": false,
                "bundled_products_conditions": false,
                "hide_purchase_link": "on",
                "download_limit": 45
            }
        },
        "edd": []
    }
}

This webhook action is used to create a download for Easy Digital Downloads on your WordPress system via a webhook call.
The description is uniquely made for the edd_create_download webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_create_download

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_create_download.
  2. All the other arguments are optional and just extend the creation of the download. We would still recommend to set the attribute download_title, to make recognizing it easy, as well as for creating proper permalinks/slugs.


Tipps

  1. By default, we create each download in a draft state. If you want to directly publish a download, use the download_status argument and set it to publish.
  2. In case you want to set a short description for your download, you can use the download_excerpt argument.


Special Arguments


price
The default price of the Easy Digital Downloads product. Please set it in the following format: 19.99

is_variable_pricing
In case you set this value to yes, the default edd_price is ignored.

variable_prices
This argument accepts a JSON formatted string of the variations you want to add. Down below, you will find an example, containing all values you can set.
{
    "1": {
        "index": "1",
        "name": "Variation Name",
        "amount": "39.90",
        "license_limit": "0",
        "is_lifetime": "1"
    },
    "2": {
        "index": "2",
        "name": "Variation Name",
        "amount": "49.90",
        "license_limit": "4"
    }
}
Here is a more detailed explanation for each of the values.
  1. The number in front of each entry and the index should always be the same. They identify which variation is which one. It has to be always a numeric string.
  2. The name argument defined the name of the variation.
  3. The amount argument defines the price of the variation. Please use the following format: 19.99.
  4. The license_limit accepts a number to limit the amount of license slots created. 0 is unlimited.
  5. The is_lifetime argument is optional. Set it to 1 to make it lifetime.

default_price_id
The default price id of the variation you want to set as the fault. You only need to set this value in case you set is_variable_pricing to yes.

download_files
This argument accepts a JSON formatted string of the downloadable files you want to add to the download. Down below, you will find an example, containing all values you can set.
{
    "1": {
        "index": "0",
        "attachment_id": "177",
        "thumbnail_size": "false",
        "name": "wp-webhooks.2.0.5",
        "file": "https:\/\/downloads.wordpress.org\/plugin\/wp-webhooks.2.0.5.zip",
        "condition": "all"
    },
    "2": {
        "index": "",
        "attachment_id": "184",
        "thumbnail_size": "false",
        "name": "wp-webhooks.2.0.5",
        "file": "https:\/\/downloads.wordpress.org\/plugin\/wp-webhooks.2.0.5.zip",
        "condition": "2"
    }
}
Here is a more detailed explanation for each of the values.
  1. The number in front of each entry and the index are the identifier of the file. They identify which downloadable file is which one. It has to be always a numeric string.
  2. The attachment_id argument can contain an attachment id (in case the download you add is available within the WordPress media library).
  3. The thumbnail_size argument can contain a specific thumbnail size (in case the download you add is available within the WordPress media library and contains the thumbnail size you defined).
  4. The name argument defines the name of the file (without the extension).
  5. The file argument defines the full, downloadable file URL.
  6. The condition argument defines if you want to enable this file only for a specific variation or not. Set all if you want to make it available for all variations. Otherwise, please use the index id.

bundled_products
This argument allows you to create download bundles. This argument accepts a JSON formatted string of the downloadads you want to bundle. You can also target only a specific variation of a product by defining the variation id, separated by an underscore.
[
    "285_1",
    "23"
]
Here is a more detailed explanation for each of the values.
  1. Each line contains one download id.
  2. On the first line, we add only the first variation of the download with the id 285.
  3. The second line adds the full download with the id 23.

bundled_products_conditions
This argument accepts a JSON formatted string of the downloadads you want to bundle. It contains further definitions on which price assignment should be given for which download.
{
    "1": "all",
    "2": "2"
}
Here is a more detailed explanation for each of the values.
  1. The first argument contains the index id of the bundled product from the bundled_products argument. The value contains the Price assignment for your given variation.
  2. The second line adds the second bundled product with the price assigment of the second variation.

increase_earnings
This argument allows you to increase the lifetime earnings for this product. In case the product does not have any lifetime earnings yet and you set this value to 25.00, then the lifetime earnings will be 0 + 25.00 = 25 $ (or the currency you set by default).

decrease_earnings
This argument allows you to decrease the lifetime earnings for this product. In case the product has lifetime earnings of 100$ and you set this value to 25.00, then the lifetime earnings will be 100 - 25.00 = 75 $ (or the currency you set by default).

increase_sales
Increase the number of sales that have been made for this product. In case you set it to 5, it will add five sales to the lifetime sales of the product (it only increases the number, no payments or anything else is added).

decrease_sales
Decrease the number of sales that have been made for this product. In case you set it to 5, it will remove five sales from the lifetime sales of the product (it only decreases the number, no payments or anything else are removed).

hide_purchase_link
By default, the purchase buttons will be displayed at the bottom of the download, when disabled you will need to use the Purchase link shortcode to output the ability to buy the product where you prefer. To hide the link, set this value to yes

download_limit
Limit the number of times a customer who purchased this product can access their download links. This is a global limit. If you want to set different limits for variations, please do that within the variable_prices argument.

download_author
The download author argument accepts either the user id of a user, or the email address of an existing user. In case you choose the email adress, we try to match it with the users on your WordPress site. In case we couldn't find a user for the given email, we leave the field empty.

download_content
The download content is the main content area of the download. It can contain HTML or any other kind of content necessary for your functionality.

download_status
The download status defines further details about how your download will be treated. By default, WordPress offers the following download statuses: draft, pending, private, publish. Please note that other plugins can extend the download status values to offer a bigger variety.

tags_input
This argument supports the default tags_input variable of the wp_insert_post() function. Please use this function only if you are known to its functionality since WordPress might not add the values properly due to permissions. If you are not sure, please use the tax_input argument instead.

Here is an example:
342,5678,2
This argument supports a comma separated list of tag names, slugs, or IDs.

tax_input
This argument allows you to add/append/delete any kind of taxonomies on your download. It uses a custom functionality that adds the taxonomies independently of the wp_update_post() function.
To make it work, we offer certain different features and methods to make the most out of the taxonomy management. Down below, you will find further information about the whole functionality.
  1. String method
    This method allows you to add/update/delete or bulk manage the download taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too. In case you use more complex taxonomies that use semicolons or double points within the slugs, you need to use the JSON method.
    • Replace existing taxonomy items
      This method allows you to replace already existing taxonomy items on the download. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      taxonomy_1,tax_item_1:tax_item_2:tax_item_3;taxonomy_2,tax_item_5:tax_item_7:tax_item_8
      To separate the taxonomies from the single taxonomy items, please use a comma ",". In case you want to add multiple items per taxonomy, you can separate them via a double point ":". To separate multiple taxonomies from each other, please separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all; in front of a semicolon-separated list of the taxonomies you want to remove all items for. Here is an example:
      ironikus-remove-all;taxonomy_1;taxonomy_2
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. Here is an example:
      ironikus-append;taxonomy_1,value_1:value_2-ironikus-delete:value_3;taxonomy_2,value_5:value_6:value_7-ironikus-delete
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2. We also add the taxonomy items value_1, value_3, value_5 and value_6. We also remove the taxonomy items value_2 and value_7.
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append; at the beginning of the string.
      ironikus-append;taxonomy_1,value_1:value_2:value_3;taxonomy_2,value_1:value_2:value_3
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2 with multiple taxonomy items on the download. The already assigned ones won't be replaced.
  2. JSON method
    This method allows you to add/update/delete or bulk manage the download taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too.
    • Replace existing taxonomy items
      This JSON allows you to replace already existing taxonomy items on the download. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      {
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog",
          "male",
          "simple"
        ]
      }
      The key on the first layer of the JSON is the slug of the taxonomy. As a value, it accepts multiple slugs of the single taxonomy terms. To add multiple taxonomies, simply append them on the first layer of the JSON.
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all as a separate value with the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. Here is an example:
      {
        "wpwhtype": "ironikus-remove-all",
        "category": [],
        "post_tag": []
      }
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append to the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. All the taxonomies you add after, will be added to the existing ones on the download.
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog"
        ]
      }
      In the example above, we append the taxonomies category and post_tag with multiple taxonomy items on the download. The already assigned ones won't be replaced.
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. To do that, simply append -ironikus-delete at the end of the taxonomy term slug. This specific taxonomy term will then be removed from the download. Here is an example:
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category-ironikus-delete"
        ],
        "post_tag": [
          "dog-ironikus-delete"
        ]
      }
      In the example above, we append the taxonomies category and post_tag. We also add the taxonomy item test-category. We also remove the taxonomy items second-category and dog.

meta_input
This argument is specifically designed to add/update or remove download meta to your created download.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the download meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the download meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single download meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the meta_input argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three download meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the meta_input argument, needs to be escaped.

wp_error
In case you set the wp_error argument to yes, we will return the WP Error object within the response if the webhook action call. It is recommended to only use this for debugging.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_create_download action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post_data, $post_id, $meta_input, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post_data (array)
    Contains the data that is used to create the download and some additional data as the meta input.
  2. $post_id (integer)
    Contains the download id of the newly created download. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $meta_input (string)
    Contains the unformatted download meta as you sent it over within the webhook request as a string.
  4. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to update (or create) a download within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_update_download
  • download_idRequired
    (Integer) The ID of the existing download
  • create_if_none
    (String) Set this value to "yes" to create the download in case the given download id does not exist. Default: no
  • price
    (float) The price of the download you want to use. Format: 19.99
  • is_variable_pricing
    (string) Set this value to "yes" if you want to activate variable pricing for this product. Default: no
  • variable_prices
    (string) A JSON formatted string, containing all of the variable product prices. Please see the description for further details.
  • default_price_id
    (integer) The ID of the price variation you want to use as the default price.
  • download_files
    (String) A JSON formatted string containing all of the downloable file. Please see the description for further details.
  • bundled_products
    (String) A JSON formatted string, containing all of the bundled products. Please see the description for further details.
  • bundled_products_conditions
    (String) A JSON formatted string that contains the price dependencies. Please see the description for further details.
  • increase_earnings
    (Float) The price you would like to increase the lifetime earnings of this product. Please see the description for further details.
  • decrease_earnings
    (Float) The price you would like to decrease the lifetime earnings of this product. Please see the description for further details.
  • increase_sales
    (Integer) Increase the number of sales from a statistical point of view. Please see the description for further details.
  • decrease_sales
    (Integer) Decrease the number of sales from a statistical point of view. Please see the description for further details.
  • hide_purchase_link
    (String) Set this string to "yes" to hide the purchase button under the download. Please see the description for more details.
  • download_limit
    (Integer) Limits how often a customer can globally download the purchase. Please see the description for further details.
  • download_author
    (mixed) The ID or the email of the user who added the post. Default is the current user ID.
  • download_date
    (string) The date of the post. Default is the current time. Format: 2018-12-31 11:11:11
  • download_date_gmt
    (string) The date of the post in the GMT timezone. Default is the value of $post_date.
  • download_content
    (string) The post content. Default empty.
  • download_content_filtered
    (string) The filtered post content. Default empty.
  • download_title
    (string) The post title. Default empty.
  • download_excerpt
    (string) The post excerpt. Default empty.
  • download_status
    (string) The post status. Default 'draft'.
  • comment_status
    (string) Whether the post can accept comments. Accepts 'open' or 'closed'. Default is the value of 'default_comment_status' option.
  • ping_status
    (string) Whether the post can accept pings. Accepts 'open' or 'closed'. Default is the value of 'default_ping_status' option.
  • download_password
    (string) The password to access the post. Default empty.
  • download_name
    (string) The post name. Default is the sanitized post title when creating a new post.
  • to_ping
    (string) Space or carriage return-separated list of URLs to ping. Default empty.
  • pinged
    (string) Space or carriage return-separated list of URLs that have been pinged. Default empty.
  • download_parent
    (int) Set this for the post it belongs to, if any. Default 0.
  • menu_order
    (int) The order the post should be displayed in. Default 0.
  • download_mime_type
    (string) The mime type of the post. Default empty.
  • guid
    (string) Global Unique ID for referencing the post. Default empty.
  • download_category
    (string) A comma separated list of category names, slugs, or IDs. Defaults to value of the 'default_category' option. Example: cat_1,cat_2,cat_3
  • tags_input
    (string) A comma separated list of tag names, slugs, or IDs. Default empty.
  • tax_input
    (string) A simple or JSON formatted string containing existing taxonomy terms. Default empty. More details within the description.
  • meta_input
    (string) A json or a comma and semicolon separated list of post meta values keyed by their post meta key. Default empty. More info in the description.
  • wp_error
    Whether to return a WP_Error on failure. Posible values: "yes" or "no". Default value: "no".
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • data
    (array) Within the data array, you will find further details about the response, as well as the payment id and further information.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "Download successfully created",
    "data": {
        "download_id": 797,
        "download_data": {
            "post_type": "download",
            "meta_data": "{\n  \"meta_key_1\": \"This is my meta value 1\",\n  \"another_meta_key\": \"This is my second meta key!\",\n  \"third_meta_key\": \"ironikus-serialize{\\\"price\\\": \\\"100\\\"}\"\n}",
            "tax_input": false,
            "create_if_none": false,
            "edd": {
                "increase_earnings": "25.49",
                "decrease_earnings": false,
                "increase_sales": "15",
                "decrease_sales": false,
                "edd_price": "11.11",
                "is_variable_pricing": 1,
                "edd_variable_prices": "{\n    \"1\": {\n        \"index\": \"1\",\n        \"name\": \"Variation 1\",\n        \"amount\": \"39.90\",\n        \"license_limit\": \"0\",\n        \"is_lifetime\": \"1\"\n    },\n    \"2\": {\n        \"index\": \"2\",\n        \"name\": \"Variation 2\",\n        \"amount\": \"49.90\",\n        \"license_limit\": \"4\"\n    }\n}",
                "default_price_id": "2",
                "edd_download_files": "{\n    \"1\": {\n        \"index\": \"0\",\n        \"attachment_id\": \"\",\n        \"thumbnail_size\": \"\",\n        \"name\": \"wp-webhooks-pro-\",\n        \"file\": \"https:\\/\\/domain.demo\\/wp-content\\/uploads\\/edd\\/2020\\/02\\/wp-webhooks-pro.zip\",\n        \"condition\": \"all\"\n    }\n}",
                "edd_bundled_products": false,
                "bundled_products_conditions": false,
                "hide_purchase_link": "on",
                "download_limit": 45
            }
        },
        "edd": []
    }
}

This webhook action is used to update a download for Easy Digital Downloads on your WordPress system via a webhook call.
The description is uniquely made for the edd_update_download webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_update_download

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_update_download.
  2. It is also required to set the download_id argument. Please set it to the id of the download you want to update.
  3. All the other arguments are optional and just extend the update process of the download.


Tipps

  1. In case the download id you provided within the download_id argument coult not be found, you can also create the post by defining the create_if_none argument with the value yes.
  2. We currently offer pre-defined fields for the download. If you want to add further meta values, you can use the meta_input argument.


Special Arguments


create_if_none
Set this value to yes to create the download in case it does not exist yet.

price
The default price of the Easy Digital Downloads product. Please set it in the following format: 19.99

is_variable_pricing
In case you set this value to yes, the default edd_price is ignored.

variable_prices
This argument accepts a JSON formatted string of the variations you want to update. Down below, you will find an example, containing all values you can set. Please not that defining this argument, it will replace all previously set variations.
{
    "1": {
        "index": "1",
        "name": "Variation Name",
        "amount": "39.90",
        "license_limit": "0",
        "is_lifetime": "1"
    },
    "2": {
        "index": "2",
        "name": "Variation Name",
        "amount": "49.90",
        "license_limit": "4"
    }
}
Here is a more detailed explanation for each of the values.
  1. The number in front of each entry and the index should always be the same. They identify which variation is which one. It has to be always a numeric string.
  2. The name argument defined the name of the variation.
  3. The amount argument defines the price of the variation. Please use the following format: 19.99.
  4. The license_limit accepts a number to limit the amount of license slots created. 0 is unlimited.
  5. The is_lifetime argument is optional. Set it to 1 to make it lifetime.

default_price_id
The default price id of the variation you want to set as the fault. You only need to set this value in case you set is_variable_pricing to yes.

download_files
This argument accepts a JSON formatted string of the downloadable files you want to add to the download. Down below, you will find an example, containing all values you can set. Please not that defining this argument, it will replace all previously set download files within this argument.
{
    "1": {
        "index": "0",
        "attachment_id": "177",
        "thumbnail_size": "false",
        "name": "wp-webhooks.2.0.5",
        "file": "https:\/\/downloads.wordpress.org\/plugin\/wp-webhooks.2.0.5.zip",
        "condition": "all"
    },
    "2": {
        "index": "",
        "attachment_id": "184",
        "thumbnail_size": "false",
        "name": "wp-webhooks.2.0.5",
        "file": "https:\/\/downloads.wordpress.org\/plugin\/wp-webhooks.2.0.5.zip",
        "condition": "2"
    }
}
Here is a more detailed explanation for each of the values.
  1. The number in front of each entry and the index are the identifier of the file. They identify which downloadable file is which one. It has to be always a numeric string.
  2. The attachment_id argument can contain an attachment id (in case the download you add is available within the WordPress media library).
  3. The thumbnail_size argument can contain a specific thumbnail size (in case the download you add is available within the WordPress media library and contains the thumbnail size you defined).
  4. The name argument defines the name of the file (without the extension).
  5. The file argument defines the full, downloadable file URL.
  6. The condition argument defines if you want to enable this file only for a specific variation or not. Set all if you want to make it available for all variations. Otherwise, please use the index id.

bundled_products
This argument allows you to create download bundles. This argument accepts a JSON formatted string of the downloadads you want to bundle. You can also target only a specific variation of a product by defining the variation id, separated by an underscore. Please not that defining this argument, will replace all previously set bundle products within this argument.
[
    "285_1",
    "23"
]
Here is a more detailed explanation for each of the values.
  1. Each line contains one download id.
  2. On the first line, we add only the first variation of the download with the id 285.
  3. The second line adds the full download with the id 23.

bundled_products_conditions
This argument accepts a JSON formatted string of the downloadads you want to bundle. It contains further definitions on which price assignment should be given for which download. Please not that defining this argument, it will replace all previously set conditions for this argument.
{
    "1": "all",
    "2": "2"
}
Here is a more detailed explanation for each of the values.
  1. The first argument contains the index id of the bundled product from the bundled_products argument. The value contains the Price assignment for your given variation.
  2. The second line adds the second bundled product with the price assigment of the second variation.

increase_earnings
This argument allows you to increase the lifetime earnings for this product. In case the product does not have any lifetime earnings yet and you set this value to 25.00, then the lifetime earnings will be 0 + 25.00 = 25 $ (or the currency you set by default).

decrease_earnings
This argument allows you to decrease the lifetime earnings for this product. In case the product has lifetime earnings of 100$ and you set this value to 25.00, then the lifetime earnings will be 100 - 25.00 = 75 $ (or the currency you set by default).

increase_sales
Increase the number of sales that have been made for this product. In case you set it to 5, it will add five sales to the lifetime sales of the product (it only increases the number, no payments or anything else is added).

decrease_sales
Decrease the number of sales that have been made for this product. In case you set it to 5, it will remove five sales from the lifetime sales of the product (it only decreases the number, no payments or anything else are removed).

hide_purchase_link
By default, the purchase buttons will be displayed at the bottom of the download, when disabled you will need to use the Purchase link shortcode to output the ability to buy the product where you prefer. To hide the link, set this value to yes

download_limit
Limit the number of times a customer who purchased this product can access their download links. This is a global limit. If you want to set different limits for variations, please do that within the variable_prices argument.

download_author
The download author argument accepts either the user id of a user, or the email address of an existing user. In case you choose the email adress, we try to match it with the users on your WordPress site. In case we couldn't find a user for the given email, we leave the field empty.

download_content
The download content is the main content area of the download. It can contain HTML or any other kind of content necessary for your functionality.

download_status
The download status defines further details about how your download will be treated. By default, WordPress offers the following download statuses: draft, pending, private, publish. Please note that other plugins can extend the download status values to offer a bigger variety.

tags_input
This argument supports the default tags_input variable of the wp_insert_post() function. Please use this function only if you are known to its functionality since WordPress might not add the values properly due to permissions. If you are not sure, please use the tax_input argument instead.

Here is an example:
342,5678,2
This argument supports a comma separated list of tag names, slugs, or IDs.

tax_input
This argument allows you to add/append/delete any kind of taxonomies on your download. It uses a custom functionality that adds the taxonomies independently of the wp_update_post() function.
To make it work, we offer certain different features and methods to make the most out of the taxonomy management. Down below, you will find further information about the whole functionality.
  1. String method
    This method allows you to add/update/delete or bulk manage the download taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too. In case you use more complex taxonomies that use semicolons or double points within the slugs, you need to use the JSON method.
    • Replace existing taxonomy items
      This method allows you to replace already existing taxonomy items on the download. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      taxonomy_1,tax_item_1:tax_item_2:tax_item_3;taxonomy_2,tax_item_5:tax_item_7:tax_item_8
      To separate the taxonomies from the single taxonomy items, please use a comma ",". In case you want to add multiple items per taxonomy, you can separate them via a double point ":". To separate multiple taxonomies from each other, please separate them with a semicolon ";" (It is not necessary to set a semicolon at the end of the last one)
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all; in front of a semicolon-separated list of the taxonomies you want to remove all items for. Here is an example:
      ironikus-remove-all;taxonomy_1;taxonomy_2
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. Here is an example:
      ironikus-append;taxonomy_1,value_1:value_2-ironikus-delete:value_3;taxonomy_2,value_5:value_6:value_7-ironikus-delete
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2. We also add the taxonomy items value_1, value_3, value_5 and value_6. We also remove the taxonomy items value_2 and value_7.
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append; at the beginning of the string.
      ironikus-append;taxonomy_1,value_1:value_2:value_3;taxonomy_2,value_1:value_2:value_3
      In the example above, we append the taxonomies taxonomy_1 and taxonomy_2 with multiple taxonomy items on the download. The already assigned ones won't be replaced.
  2. JSON method
    This method allows you to add/update/delete or bulk manage the download taxonomies using a simple string. Both the string and the JSON method support custom taxonomies too.
    • Replace existing taxonomy items
      This JSON allows you to replace already existing taxonomy items on the download. In case a taxonomy item does not exists at the point you want to add it, it will be ignored.
      {
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog",
          "male",
          "simple"
        ]
      }
      The key on the first layer of the JSON is the slug of the taxonomy. As a value, it accepts multiple slugs of the single taxonomy terms. To add multiple taxonomies, simply append them on the first layer of the JSON.
    • Remove all taxonomy items for a single taxonomy
      In case you want to remove all taxonomy items from one or multiple taxonomies, you can set ironikus-remove-all as a separate value with the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. Here is an example:
      {
        "wpwhtype": "ironikus-remove-all",
        "category": [],
        "post_tag": []
      }
    • Append taxonomy items
      You can also append any taxonomy items without the existing ones being replaced. To do that, simply add ironikus-append to the wpwhtype key. The wpwhtype key is a reserved key for further actions on the data. All the taxonomies you add after, will be added to the existing ones on the download.
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category"
        ],
        "post_tag": [
          "dog"
        ]
      }
      In the example above, we append the taxonomies category and post_tag with multiple taxonomy items on the download. The already assigned ones won't be replaced.
    • Remove single taxonomy items for a taxonomy
      You can also remove only single taxonomy items for one or multiple taxonomies. To do that, simply append -ironikus-delete at the end of the taxonomy term slug. This specific taxonomy term will then be removed from the download. Here is an example:
      {
        "wpwhtype": "ironikus-append",
        "category": [
          "test-category",
          "second-category-ironikus-delete"
        ],
        "post_tag": [
          "dog-ironikus-delete"
        ]
      }
      In the example above, we append the taxonomies category and post_tag. We also add the taxonomy item test-category. We also remove the taxonomy items second-category and dog.

meta_input
This argument is specifically designed to add/update or remove download meta to your created download.
To create/update or delete custom meta values, we offer you two different ways:
  1. String method
    This method allows you to add/update or delete the download meta using a simple string. To make it work, separate the meta key from the value using a comma (,). To separate multiple meta settings from each other, simply separate them with a semicolon (;). To remove a meta value, simply set as a value ironikus-delete
    meta_key_1,meta_value_1;my_second_key,ironikus-delete
    IMPORTANT: Please note that if you want to use values that contain commas or semicolons, the string method does not work. In this case, please use the JSON method.
  2. JSON method
    This method allows you to add/update or remove the download meta using a JSON formatted string. To make it work, add the meta key as the key and the meta value as the value. To delete a meta value, simply set the value to ironikus-delete. Here's an example on how this looks like:
    {
      "meta_key_1": "This is my meta value 1",
      "another_meta_key": "This is my second meta key!"
      "third_meta_key": "ironikus-delete"
    }
Advanced: We also offer JSON to array serialization for single download meta values. This means, you can turn JSON into a serialized array.
As an example: The following JSON {"price": "100"} will turn into a:1:{s:5:"price";s:3:"100";}
To make it work, you need to add the following string in front of the escaped JSON within the value field of your single meta value of the meta_input argument: ironikus-serialize. Here's a full example:
{
  "meta_key_1": "This is my meta value 1",
  "another_meta_key": "This is my second meta key!",
  "third_meta_key": "ironikus-serialize{\"price\": \"100\"}"
}
This example will create three download meta entries. The third entry has the meta key third_meta_key and a serialized meta value of a:1:{s:5:"price";s:3:"100";}. The string ironikus-serialize in front of the escaped JSON will tell our plugin to serialize the value. Please note that the JSON value, which you include within the original JSON string of the meta_input argument, needs to be escaped.

wp_error
In case you set the wp_error argument to yes, we will return the WP Error object within the response if the webhook action call. It is recommended to only use this for debugging.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_update_download action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post_data, $post_id, $meta_input, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post_data (array)
    Contains the data that is used to create the download and some additional data as the meta input.
  2. $post_id (integer)
    Contains the download id of the newly created download. Please note that it can also contain a wp_error object since it is the response of the wp_insert_user() function.
  3. $meta_input (string)
    Contains the unformatted download meta as you sent it over within the webhook request as a string.
  4. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to delete (or trash) a download within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_delete_download
  • download_idRequired
    The download id of the download you want to delete.
  • force_delete
    (optional) Whether to bypass trash and force deletion. Possible values: "yes" and "no". Default: "no".
  • do_action
    Advanced: Register a custom action after Webhooks Pro fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • data
    (array) Within the data array, you will find further details about the response, as well as the download id and further information.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "The download was successfully deleted.",
    "data": {
        "post_id": 747,
        "force_delete": false
    }
}

This webhook action is used to delete a download on your WordPress system via a webhook call.
This description is uniquely made for the edd_delete_download webhook action.
In case you want to first understand on how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_delete_download

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_delete_download.
  2. It is also required to set the download id of the download you want to delete. You can do that by using the download_id argument.
  3. All the other arguments are optional and just extend the deletion of the download.
  4. Please note that deleting a download without defining the force_delete argument set to yes, only moves the downloads to the trash.


Special Arguments


force_delete
In case you set the force_delete argument to yes, the download will be completely removed from your WordPress website.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_delete_download action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $post, $post_id, $check, $force_delete ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $post (object)
    Contains the WordPress download object of the already deleted download.
  2. $post_id (integer)
    Contains the download id of the deleted post.
  3. $check (mixed)
    Contains the response of the wp_delete_post() function.
  4. $force_delete (string)
    Returns either yes or no, depending on your settings for the force_delete argument.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to create a payment within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_create_payment
  • customer_emailRequired
    (String) The email of the customer you want to associate with the payment. Please see the description for further details.
  • discounts
    (String) A comma-separated list of discount codes. Please see the description for further details.
  • gateway
    (String) The slug of the currently used gateway. Please see the description for further details. Default empty.
  • currency
    (String) The currency code of the payment. Default is your default currency. Please see the description for further details.
  • parent_payment_id
    (Integer) The payment id of a parent payment.
  • payment_status
    (String) The status of the payment. Default is "pending". Please see the description for further details.
  • product_data
    (String) A JSON formatted string, containing all the product data and options. Please refer to the description for examples and further details.
  • edd_agree_to_terms
    (String) Defines if a user agreed to the terms. Set it to "yes" to mark the user as agreed. Default: no
  • edd_agree_to_privacy_policy
    (String) Defines if a user agreed to the privacy policy. Set it to "yes" to mark the user as agreed. Default: no
  • payment_date
    (String) Set a custom payment date. The format is flexible, but we recommend SQL format.
  • user_id
    (Integer) The user id of the WordPress user. If not defined, we try to fetch the id using the customer_email.
  • customer_first_name
    (String) The first name of the customer. Please see the description for further details.
  • customer_last_name
    (String) The last name of the customer. Please see the description for further details.
  • customer_country
    (String) The country code of the customer.
  • customer_state
    (String) The state of the customer.
  • customer_zip
    (String) The zip of the customer.
  • send_receipt
    (String) Set it to "yes" for sending out a receipt to the customer. Default "no". Please see the description for further details.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • data
    (array) Within the data array, you will find further details about the response, as well as the payment id and further information.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "The payment was successfully created.",
    "data": {
        "payment_id": 747,
        "payment_data": {
            "purchase_key": "aa10bc587fb544b10c01fe13905fba74",
            "user_email": "jondoe@test.test",
            "user_info": {
                "id": 0,
                "email": "jondoe@test.test",
                "first_name": "Jannis",
                "last_name": "Testing",
                "discount": false,
                "address": {
                    "country": "AE",
                    "state": false,
                    "zip": false
                }
            },
            "gateway": "paypal",
            "currency": "EUR",
            "cart_details": [
                {
                    "id": 176,
                    "quantity": 1,
                    "item_price": 49,
                    "tax": 5,
                    "discount": 4,
                    "fees": [
                        {
                            "label": "Custom Fee",
                            "amount": 10,
                            "type": "fee",
                            "id": "",
                            "no_tax": false,
                            "download_id": 435
                        }
                    ],
                    "item_number": {
                        "options": {
                            "price_id": null
                        }
                    }
                }
            ],
            "parent": false,
            "status": "publish",
            "post_date": "2020-04-23 00:00:00"
        }
    }
}

This webhook action is used to create a payment for Easy Digital Downloads within your WordPress system via a webhook call.
The description is uniquely made for the edd_create_payment webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_create_payment

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_create_payment.
  2. It is also required to set the customer_email argument. Please set it to the email of the person you want to assign to the payment.
  3. All the other arguments are optional and just extend the creation of the EDD payment.


Tipps

  1. This webhook action is very versatile. Depending on your active extensions of the plugin, you will see different arguments and descriptions. This way, we can always provide you personalized features based on your active plugins.
  2. To run the logic, we use the EDD default function for inserting payments: edd_insert_payment() - you can therefore use all the features available for the function.


Special Arguments


customer_email
The customer email is the email address of the customer you want to associate with the payment. In case there is no existing EDD customer with this email available, EDD will create one. (An EDD customer is not the same as a WordPress user. There is no WordPRess user created by simply defining the email.) To associate a WordPress user with the EDD customer, please check out the user_id argument.

discounts
This argument accepts a single discount code or a comma-separated list of multiple discount codes. Down below, you will find an example on how to use multiple discount codes. Please note: This only adds the discount code to the payment, but it does not affect the pricing. If you want to apply the discounts to the payment pricing, you need to use the discount key within the product_data line item argument.
10PERCENTOFF,EASTERDISCOUNT10

gateway
The slug of the gateway you want to use. Down below, you will find further details on the available default gateways:
  1. PayPal Standard: paypal
  2. Test Payment: manual
  3. Amazon: amazon

currency
The currency code of the currency you want to use for this payment. You can set it to e.g. EUR or USD. If you leave it empty, we use your default currency. ( edd_get_currency() )

payment_status
Use this argument to set a custom payment status. Down below, you will find a list of all available, default payment names and its slugs. To make this argument work, please define the slug of the status you want. If you don't define any, pending is used.
  1. Pending: pending
  2. Complete: publish
  3. Refunded: refunded
  4. Failed: failed
  5. Abandoned: abandoned
  6. Revoked: revoked
  7. Processing: processing
  8. Renewal: edd_subscription

product_data
This argument accepts a JSON formatted String, which contains all the downloads you want to add, including further details about the pricing. Due to the complexity of the string, we explained each section of the following JSON down below. The JSON below contains a list with one product which is added to your payment details. They also determine the pricing of the payment and other information.
[
    {
        "id": 176,
        "quantity": 1,
        "item_price": 49,
        "tax": 5,
        "discount": 4,
        "fees": [
            {
                "label": "Custom Fee",
                "amount": 10,
                "type": "fee",
                "id": "",
                "no_tax": false,
                "download_id": 435
            }
        ],
        "item_number": {
            "options": {
                "price_id": null,
                "is_upgrade": true,
                "is_renewal": true,
                "license_id": 3423,
                "recurring": {
                    "trial_period": {
                        "unit": 33,
                        "quantity": 2
                    },
                    "signup_fee": 33.1,
                    "period": "monthly",
                    "times": 4
                },
                "license_key": "iuzgsdfibasfsdfsafk"
            }
        }
    }
]
The above JSON adds a single download to the payment. If you want to add multiple products, simply add another entry within the [] brackets. HEre are all the values explained:
  1. id (Required)
    This is the download id within WordPress.
  2. quantity (Required)
    The number of how many times this product should be added.
  3. item_price (Required)
    The price of the product you want to add
  4. tax (Required)
    The amount of tax that should be added to the item_price
  5. discount
    The amount of discount that should be removed from the item_price
  6. fees
    Fees are extra prices that are added on top of the product price. Usually this is set for signup fees or other prices that are not directly related with the download. The values set within the fees are all optional, but recommended to be available within the JSON.
  7. item_number
    The item number contains variation related data about the product. In case you want to add a variation, you can define the price id there.


send_receipt
The send_receipt argument allows you to send out the receipt for the payment you just made. Please note that this logic uses the EDD default functionality. The receipt is only send based on the given payment status.

customer_first_name
Please not that defining the customer first name (or last name) are only affecting the custoemr in case it doesn't exist at that point. For existing customers, the first and last name is not updated.

customer_last_name
Please not that defining the customer last name (or first name) are only affecting the custoemr in case it doesn't exist at that point. For existing customers, the first and last name is not updated.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_create_payment action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 4 );
function my_custom_callback_function( $payment_id, $purchase_data, $send_receipt, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $payment_id (integer)
    Contains the id of the newly created payment.
  2. $purchase_data (integer)
    An array that contins the validated payment data we sent over to the edd_insert_payment() function
  3. $send_receipt (string)
    A boolean value of wether the receipt should be sent (if applicable) or not.
  4. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to update a payment within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_update_payment
  • payment_idRequired
    (Integer) The id of the payment you want to update.
  • payment_status
    (String) The status of the payment. Please see the description for further details.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • data
    (array) Within the data array, you will find further details about the response, as well as the payment id and further information.
  • errors
    (array) An array containing all errors that might happened during the update.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "The payment was successfully updated or no changes have been made.",
    "data": {
        "payment_id": 749,
        "payment_status": "processing"
    },
    "errors": []
}

This webhook action is used to update a payment for Easy Digital Downloads within your WordPress system via a webhook call.
The description is uniquely made for the edd_update_payment webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_update_payment

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_update_payment.
  2. It is also required to set the payment_id argument. Please set the id of the payment you want to update.
  3. All the other arguments are optional and just extend the creation of the EDD payment.


Tipps

  1. Since this webhook action is very versatile, it is highly recommended to check out the Special Arguments list down below.


Special Arguments


payment_status
This argument allows you to update the status of the payment. Here is a list of the default payment statuses you can use:
  1. Pending: pending
  2. Complete: publish
  3. Refunded: refunded
  4. Failed: failed
  5. Abandoned: abandoned
  6. Revoked: revoked
  7. Processing: processing
  8. Renewal: edd_subscription

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_update_payment action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 2 );
function my_custom_callback_function( $payment_id, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $payment_id (array)
    Contains the id of the newly updated payment.
  2. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to delete a payment within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_delete_payment
  • payment_idRequired
    (Integer) The id of the payment you want to update.
  • update_customer_stats
    (String) Set this value to "yes" to update the statistics of the customer. Default: no
  • delete_download_logs
    (String) Set this value to "yes" to delete the payment including all its related download logs. Default: no
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • data
    (array) Within the data array, you will find further details about the response, as well as the payment id and further information.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "The payment was successfully created.",
    "data": {
        "payment_id": 747,
    }
}

This webhook action is used to delete a payment for Easy Digital Downloads within your WordPress system via a webhook call.
The description is uniquely made for the edd_delete_payment webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_delete_payment

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_delete_payment.
  2. It is also required to set the payment_id argument. Please set the id of the payment you want to delete.
  3. All the other arguments are optional and just extend the creation of the EDD payment.


Tipps

  1. By default, we do not update the statistics of the user (lifetime value, etc). To recalculate the statustics, please set the update_customer_stats argument to 'yes'.
  2. You can also delete all the download logs of the payment using the delete_download_logs argument. Set it to yes to delete them too.


Special Arguments


update_customer_stats
Set this value to yes to decrease the purchase count, as well as the total value.

delete_download_logs
This argument can remove all download logs that are related to the payment id. To delete the logs, simply set the argument value to yes

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_delete_payment action was fired.
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 2 );
function my_custom_callback_function( $payment_id, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $payment_id (array)
    Contains the id of the newly deleted payment.
  2. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to create a customer within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_create_customer
  • customer_emailRequired
    (String) The email of the customer you want to create. In case the user already exists, we do not update it.
  • customer_first_name
    (String) The first name of the customer.
  • customer_last_name
    (String) The last name of the customer.
  • additional_emails
    (String) A comma-separated list of additional email addresses. Please check the description for further details.
  • attach_payments
    (String) A comma-, and doublepoint-separated list of payment ids you want to assign to the user. Please check the description for further details.
  • increase_purchase_count
    (Integer) increase the purchase count for the customer.
  • increase_lifetime_value
    (Float) The price you want to add to the lifetime value of the customer. Please check the description for further details.
  • set_primary_email
    (String) The email you want to set as the new primary email. Default: customer_email
  • customer_notes
    (String) A JSON formatted string containing one or multiple customer notes. Please check the description for further details.
  • customer_meta
    (String) A JSON formatted string containing one or multiple customer meta data. Please check the description for further details.
  • user_id
    (Integer) The user id of the WordPress user you want to assign to the customer. Please read the description for further details.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • customer_id
    (Integer) The ID of the customer
  • customer_email
    (String) The email you set within the customer_email argument.
  • additional_emails
    (String) The additional emails you set within the additional_emails argument.
  • customer_first_name
    (String) The first name you set within the customer_first_name argument.
  • customer_last_name
    (String) The last name you set within the customer_last_name argument.
  • attach_payments
    (String) The payment ids you set within the attach_payments argument.
  • increase_purchase_count
    (Integer) The purchase count you set within the increase_purchase_count argument.
  • increase_lifetime_value
    (Float) The lifetime value you set within the increase_lifetime_value argument.
  • customer_notes
    (String) The customer notes you set within the customer_notes argument.
  • customer_meta
    (String) The customer meta you set within the customer_meta argument.
  • user_id
    (String) The user id you set within the user_id argument.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "The user was successfully created.",
    "customer_id": "5",
    "customer_email": "test@domain.com",
    "additional_emails": "second@domain.com,thir@domain.com",
    "customer_first_name": "John",
    "customer_last_name": "Doe",
    "attach_payments": "747",
    "increase_purchase_count": 2,
    "increase_lifetime_value": "55.46",
    "customer_notes": "[\"First Note 1\",\"First Note 2\"]",
    "customer_meta": "{\"meta_1\": \"test1\",\"meta_2\": \"test2\"}"
    "user_id": 23
}

This webhook action is used to create a customer for Easy Digital Downloads within your WordPress system via a webhook call.
The description is uniquely made for the edd_create_customer webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_create_customer

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_create_customer.
  2. It is also required to set the customer_email argument. Please set it to the email of the person you want to add as a customer.
  3. All the other arguments are optional and just extend the creation of the EDD customer.


Tipps

  1. Creating a customer is not the same as creating a user. Easy Digital Downloads uses its own logic and tables for customers. Still, you can assign a user to a customer usign the user_id argument.
  2. In case the email you try to use, for adding the customer, already exists within the customer table, the customer won't be created.
  3. Since this webhook action is very versatile, it is highly recommended to check out the Special Arguments list down below.


Special Arguments


customer_email
The customer email is the email address of the customer you want to associate with the newly created customer. In case there is no existing EDD customer with this email available, EDD will create one. (An EDD customer is not the same as a WordPress user. There is no WordPress user created by simply defining the email.) To associate a WordPress user with the EDD customer, please check out the user_id argument.

additional_emails
You can add additional emails to a customer. To do that, simply comma-separate the emails within the field. The primary email address is always the customer_email argument. Here is an example:
jondoe@mydomain.com,anotheremail@domain.com

attach_payments
This argument allows you to connect certain payment ids to the user. To set multiple payments, please separate them with a comma. By default, it recalculates the total amount. If you do not want that, add :no_update_stats after the payment id. Here is an example:
125,365,444:no_update_stats,777
The example above asigns the payment ids 125, 365, 444, 777 to the customer. It also assigns the payment id 444, but it does not update the statistics.

increase_purchase_count
This field accepts a number, which is added on top of the existing purchase count. If you are going to add three payments for a new customer, and you set this value to 1, your total purchase count will show 4.

increase_lifetime_value
This field accepts a decimalnumber, which is added on top of the existing lifetime value. If you are going to add one payment with a price of 20$ for a new customer, and you set this value to 5$, the total lifetime value will show 25$.

customer_notes
Use this argument to add one or multiple customer notes to the customer. This value accepts a JSON, containing one customer note per line. Here is an example:
[
  "First Note 1",
  "First Note 2"
]
The example above adds two notes.

customer_meta
This argument allows you to add one or multiple customer meta values to your newly created customer, using a JSON string. Easy Digital Downloads uses a custom table for these meta values. Here are some examples on how you can use it:
  • Add/update meta values
    This JSON shows you how to add simple meta values for your customer.
    {
      "meta_1": "test1",
      "meta_2": "test2"
    }
    The key is always the customer meta key. On the right, you always have the value for the customer meta value. In this example, we add two meta values to the customer meta. In case a meta key already exists, it will be updated.
  • Delete meta values
    You can also delete existing meta key by setting the value to ironikus-delete. This way, the meta will be removed. Here is an example:
    {
      "meta_1": "test1",
      "meta_2": "ironikus-delete"
    }
    The example above will add the meta key meta_1 with the value test1 and it deletes the meta key meta_2 including its value.
  • Add/update/remove serialized meta values
    Sometimes, it is necessary to add serialized arrays to your data. Using the json below, you can do exactly that. You can use a simple JSON string as the meta value and we automatically convert it to a serialized array once you place the identifier ironikus-serialize in front of it. Here is an example:
    {
      "meta_1": "test1",
      "meta_2": "ironikus-serialize{\"test_key\":\"wow\",\"testval\":\"new\"}"
    }
    This example adds a simple meta with meta_1 as the key and test1 as the value. The second meta value contains a json value with the identifier ironikus-serialize in the front. Once this value is saved to the database, it gets turned into a serialized array. In this example, it would look as followed:
    a:2:{s:8:"test_key";s:3:"wow";s:7:"testval";s:3:"new";}


user_id
This argument allows you to assign a user to the Easy Digital Downloads customer. In case the user id is not defined, we will automatically try to match the primary email with a WordPress user.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_create_customer action was fired (It also fires if the user was not successfully created, but you can check if the user id is set or not to determine if it worked).
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 2 );
function my_custom_callback_function( $customer_id, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $customer_id (integer)
    The customer id of the newly created customer. 0 or false if something went wrong.
  2. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller. This includes all of in the request set data.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.
This webhook action allows you to update (and create) a customer within Easy Digital Downloads.
  • actionRequired
    Always required. Determines which webhook action you want to target. (Alternatively, set this value as a query parameter within the URL) For this webhook action, please set it to edd_update_customer
  • customer_valueRequired
    (String) The actual value you want to use to determine the customer. In case you havent set the get_customer_by argument or you set it to email, place the customer email in here.
  • get_customer_by
    (String) The type of value you want to use to fetch the customer from the database. Possible values: email, customer_id, user_id. Default: email
  • customer_email
    (String) The primary email of the customer you want to update. In case the user does not exists, we use this email to create it (If you have set the argument create_if_none to yes).
  • customer_first_name
    (String) The first name of the customer.
  • customer_last_name
    (String) The last name of the customer.
  • additional_emails
    (String) A comma-separated list of additional email addresses. Please check the description for further details.
  • attach_payments
    (String) A comma-, and doublepoint-separated list of payment ids you want to assign to the user. Please check the description for further details.
  • increase_purchase_count
    (Integer) increase the purchase count for the customer.
  • increase_lifetime_value
    (Float) The price you want to add to the lifetime value of the customer. Please check the description for further details.
  • set_primary_email
    (String) The email you want to set as the new primary email. Default: customer_email
  • customer_notes
    (String) A JSON formatted string containing one or multiple customer notes. Please check the description for further details.
  • customer_meta
    (String) A JSON formatted string containing one or multiple customer meta data. Please check the description for further details.
  • user_id
    (Integer) The user id of the WordPress user you want to assign to the customer. Please read the description for further details.
  • create_if_none
    Set this argument to "yes" if you want to create the customer in case it does not exist.
  • do_action
    Advanced: Register a custom action after WP Webhooks fires this webhook. More infos are in the description.
  • success
    (Bool) True if the action was successful, false if not. E.g. array( 'success' => true )
  • msg
    (string) A message with more information about the current request. E.g. array( 'msg' => "This action was successful." )
  • customer_id
    (Integer) The ID of the customer
  • customer_email
    (String) The email you set within the customer_email argument.
  • additional_emails
    (String) The additional emails you set within the additional_emails argument.
  • customer_first_name
    (String) The first name you set within the customer_first_name argument.
  • customer_last_name
    (String) The last name you set within the customer_last_name argument.
  • attach_payments
    (String) The payment ids you set within the attach_payments argument.
  • increase_purchase_count
    (Integer) The purchase count you set within the increase_purchase_count argument.
  • increase_lifetime_value
    (Float) The lifetime value you set within the increase_lifetime_value argument.
  • customer_notes
    (String) The customer notes you set within the customer_notes argument.
  • customer_meta
    (String) The customer meta you set within the customer_meta argument.
  • user_id
    (String) The user id you set within the user_id argument.

Here is an example of all the available default fields. The fields may vary based on custom extensions, third party plugins or different values.

{
    "success": true,
    "msg": "The user was successfully created.",
    "customer_id": "5",
    "customer_email": "test@domain.com",
    "additional_emails": "second@domain.com,thir@domain.com",
    "customer_first_name": "John",
    "customer_last_name": "Doe",
    "attach_payments": "747",
    "increase_purchase_count": 2,
    "increase_lifetime_value": "55.46",
    "customer_notes": "[\"First Note 1\",\"First Note 2\"]",
    "customer_meta": "{\"meta_1\": \"test1\",\"meta_2\": \"test2\"}"
    "user_id": 23
}

This webhook action is used to update a customer for Easy Digital Downloads within your WordPress system via a webhook call.
The description is uniquely made for the edd_update_customer webhook action.
In case you want to first understand how to setup webhook actions in general, please check out the following manuals:
https://ironikus.com/docs/article-categories/get-started/

How to use edd_update_customer

  1. The first argument you need to set within your webhook action request is the action argument. This argument is always required. Please set it to edd_update_customer.
  2. As a second argument, you need to set the actual data you want to use for fetching the user. If you have chosen nothing or email for the get_customer_by argument, you need to include the customers email address here.
  3. All the other arguments are optional and just extend the update process of the EDD customer.


Tipps

  1. Updating a customer is not the same as updating a user. Easy Digital Downloads uses its own logic and tables for customers. Still, you can assign or update a user to a customer using the user_id argument.
  2. You can also create a user if your given values did not find any. To do that, simply set the create_if_none argument to yes.
  3. Since this webhook action is very versatile, it is highly recommended to check out the Special Arguments list down below.


Special Arguments


customer_value
The value we use to determine the customer. In case you haven't set the get_user_by argument or you have set it to email, please include the customer email in here. If you have chosen the customer_id, please include the customer id and in case you set user_id, please include the user id.

get_customer_by
Customize the default way we use to fetch the customer from the backend. Possible values are email (Default), customer_id or user_id.

customer_email
The customer email is the primary email address of the customer you want to update. In case we didn't find any customer and you set the create_if_none argument to yes, we will create the customer with this email address in case you did not use an email for the customer_value argument.

additional_emails
You can add and/or remove additional emails on the customer. To do that, simply comma-separate the emails within the field. The primary email address is always the customer_email argument. Here is an example:
jondoe@mydomain.com,anotheremail@domain.com

You can also remove already assigned email addresses. To do that, simply add :remove after the email. This will cause the email to be removed from the user. Here is an example:
fourth@domain.com:remove,more@domain.demo
The above example removes the email fourth@domain.com and adds the email more@domain.demo
attach_payments
This argument allows you to connect and/or remove certain payment ids at the user. To set multiple payments, please separate them with a comma. By default, it recalculates the total amount. If you do not want that, add :no_update_stats after the payment id. Here is an example:
125,365,444:no_update_stats,777
The example above asigns the payment ids 125, 365, 444, 777 to the customer. It also assigns the payment id 444, but it does not update the statistics.
To remove certain payments, please add :remove after the payment id. You can also combine it with the recalculation setting of the totals. Here is an example:
125remove,444:no_update_stats,777
The example above removes the payment with the id 125, adds the payment 777 and adds the payment 444 without refreshing the stats.

increase_purchase_count
This field accepts a number, which is added on top of the existing purchase count. If you are going to add three payments for a customer that has currently none, and you set this value to 1, your total purchase count will show 4.

increase_lifetime_value
This field accepts a decimalnumber, which is added on top of the existing lifetime value. If you are going to add one payment with a price of 20$ for a customer that has 0 lifetime value, and you set this value to 5$, the total lifetime value will show 25$.

customer_notes
Use this argument to add one or multiple customer notes to the customer. This value accepts a JSON, containing one customer note per line. Here is an example:
[
  "First Note 1",
  "First Note 2"
]
The example above adds two notes.

customer_meta
This argument allows you to add one or multiple customer meta values to your newly created customer, using a JSON string. Easy Digital Downloads uses a custom table for these meta values. Here are some examples on how you can use it:
  • Add/update/remove meta values
    This JSON shows you how to add simple meta values for your customer.
    {
      "meta_1": "test1",
      "meta_2": "test2"
    }
    The key is always the customer meta key. On the right, you always have the value for the customer meta value. In this example, we add two meta values to the customer meta. In case a meta key already exists, it will be updated.
  • Delete meta values
    You can also delete existing meta key by setting the value to ironikus-delete. This way, the meta will be removed. Here is an example:
    {
      "meta_1": "test1",
      "meta_2": "ironikus-delete"
    }
    The example above will add the meta key meta_1 with the value test1 and it deletes the meta key meta_2 including its value.
  • Add/update serialized meta values
    Sometimes, it is necessary to add serialized arrays to your data. Using the json below, you can do exactly that. You can use a simple JSON string as the meta value and we automatically convert it to a serialized array once you place the identifier ironikus-serialize in front of it. Here is an example:
    {
      "meta_1": "test1",
      "meta_2": "ironikus-serialize{\"test_key\":\"wow\",\"testval\":\"new\"}"
    }
    This example adds a simple meta with meta_1 as the key and test1 as the value. The second meta value contains a json value with the identifier ironikus-serialize in the front. Once this value is saved to the database, it gets turned into a serialized array. In this example, it would look as followed:
    a:2:{s:8:"test_key";s:3:"wow";s:7:"testval";s:3:"new";}


user_id
This argument allows you to assign a user to the Easy Digital Downloads customer. In case the user id is not defined, we will automatically try to match the primary email with a WordPress user.

create_if_none
This argument allows you to create a customer in case it does not exist yet. Please set this argument to yes to create the customer. Default: no. In case the user does not exist, we use the email from the customer_value argument or in case you used a different value, we use the emfial from the customer_email argument.

do_action
The do_action argument is an advanced webhook for developers. It allows you to fire a custom WordPress hook after the edd_update_customer action was fired (It also fires if the user was not successfully updated, but you can check if the user id is set or not to determine if it worked).
You can use it to trigger further logic after the webhook action. Here's an example:

Let's assume you set for the do_action parameter fire_this_function. In this case, we will trigger an action with the hook name fire_this_function. Here's how the code would look in this case:
add_action( 'fire_this_function', 'my_custom_callback_function', 20, 2 );
function my_custom_callback_function( $customer_id, $return_args ){
    //run your custom logic in here
}
Here's an explanation to each of the variables that are sent over within the custom function.
  1. $customer_id (integer)
    The customer id of the newly created customer. 0 or false if something went wrong.
  2. $return_args (array)
    An array containing the information we will send back as the response to the initial webhook caller. This includes all of in the request set data.
Here you can test the specified webhook. Please note, that this test can modify the data of your website (Depending on what action you test). Also, you will see the response as any web service receives it.
Please choose the webhook you are going to run the test with. Simply select the one you want to use down below.