Skip to content
Advertisement

Check if user have permission or not to download any file in WooCommerce

I want to check whether any user have permission or not to download any file. I have product id and user id so How I can check?

I have explored a lot on google and in woocommerce documentation but didn’t find any solution.

Any help?

Thanks in advance.

Advertisement

Answer

2020 – Code update for WooCommerce 3+

Here is the process to get downloadable order items information that you can use in any function or hooked function in your php files:

JavaScript

Code goes in any php file of your active child theme (or active theme). Tested and works.

Reference:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement