ok, its working with
$product = wc_get_product($item->ID);
I checked that function $product = new WC_Product() is creating a simple product not with variation. How to make it right to create new product with variations?
I figure out that $post is returning course id not lesson id. Is it possible to get to lesson not using $post?
The learnpress lesson page is based on Single page of archive. when i use global $post;
print_r($post->ID); it’s showing the correct ID of lesson
Yeah i tried, it works but i can’t figure out how to implement ACF there. I tried with get_field() get_post_field() get_post_meta()