Inside the loop this works. If you are trying to access the variable on an early hook (such as init
) then it won’t work. I can’t help you further here. You need to ask your own specific and detailed question.
Hey thanks for the comment .Sadly I got no question asking power anymore on SO. Could you direct me to some other stream where you could help me. Thanks a lot
See @Samyer’s 2017 Update. Using $product->id
will trigger this message: Product properties should not be accessed directly
© 2020 All Rights Reserved. Design by Free html Templates
I am not able to retrieve the current product id using any of the above two methods. I am using custom plugin to access the current plugin displayed. Please could you help me…
CommentedOct 16, 2015 at 7:00