• I have a custom download hook that performs a web service call rather than providing a file to download. I use the filter hook for the download, which is passed in the filename and path (only).

    add_filter(‘woocommerce_download_file_redirect’,’woo_myplug_download_url’, 5, 2);
    add_filter(‘woocommerce_download_file_force’,’woo_myplug_download_url’, 5, 2);
    add_filter(‘woocommerce_download_file_xsendfile’,’woo_myplug_download_url’, 5, 2);

    I’d like to know if it’s possible to hook the download such that it knows details of the purchase that occurred (such as quantity selected) DURING the execution of the download filterhook [after checkout], so that the file/content being served can be modified in some way.

    Alternately, how does one go about implementing a new product type (e.g not virtual OR downloadable)?

  • The topic ‘access details of product/checkout from download hook’ is closed to new replies.