Does this recent thread answer your question? useProductContext() returning "undefined" when used in second module