The WordPress Core woocommerce download product hook.


do_action( 'woocommerce_download_product', (unknown) $download_get_user_email, (unknown) $download_get_order_key, (unknown) $download_get_product_id, (unknown) $download_get_user_id, (unknown) $download_get_download_id, (unknown) $download_get_order_id ); 

Parameters (6)

0. $download_get_user_email (unknown)
The download get user email.
1. $download_get_order_key (unknown)
The download get order key.
2. $download_get_product_id (unknown)
The download get product id.
3. $download_get_user_id (unknown)
The download get user id.
4. $download_get_download_id (unknown)
The download get download id.
5. $download_get_order_id (unknown)
The download get order id.


To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'woocommerce_download_product', $download_get_user_email, $download_get_order_key, $download_get_product_id, $download_get_user_id, $download_get_download_id, $download_get_order_id ); 
The following example is for adding a hook callback.
  1. // define the woocommerce_download_product callback 
  2. function action_woocommerce_download_product( $download_get_user_email, $download_get_order_key, $download_get_product_id, $download_get_user_id, $download_get_download_id, $download_get_order_id ) { 
  3. // make action magic happen here... 
  4. }; 
  6. // add the action 
  7. add_action( 'woocommerce_download_product', 'action_woocommerce_download_product', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'woocommerce_download_product', 'action_woocommerce_download_product', 10, 6 ); 

Defined (1)

The action is defined in the following location(s).

  1. do_action(