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.


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


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.