So I'm working with the sinlge-download.php page and I'm trying to check if the specific product is in a specific category.
Here is what I tried but I only get the ELSE result even if the download is a book.
if( in_category( 'Books' ) ) {
echo 'This product is a book';
} else {
echo 'This product is not a book';
}
According to EDD docs, the category is:
download_categoryEasy Digital Download DocsFor this... use function
has_termsincein_categoryrefers to WordPressposttypepostsand not for custom post types like the downloads.