attach_product_download

called when product asset is attached to product or product variant.

add_action('attach_product_download', [callback] );

@param int $fileid the file ID.
@param int $variationid product variation ID the download is attached to.

Description

This hook happens when an uploaded product file is attached to a product/product variation. See Parameters passed to the ‘[callback]’.

Example

add_action('attach_product_download', 'my_function', 10, 2);
function my_function ( $fileid, $variationid ) {
// do stuff
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar