Is there any way to use content_determined Only for a certain type of publication, specifically products (woocomerce)?
My code:
add_filter (& # 39; default_content & # 39 ;, & # 39; set_default_content & # 39 ;, 10, 2);
function set_default_content ($ content, $ product) {
$ content = & # 39; content to add to a post & # 39;]& # 39 ;;
return $ content;
}
I've tried with if (& # 39; product & # 39; == get_post_type ())
or even if (& # 39; page & # 39; == get_post_type ())
to try it but it does not work.
I know that something small could be missing, but it seems that I can not find an answer.