• I installed the latest version of WP Shopify today. I’m trying to display products using both the default “WP Shopify Products” page as well as my own page with the “[wps_products]” shortcode. It displays “Loading component …” and gives the following JavaScript error:

    Uncaught TypeError: Cannot read properties of undefined (reading 'createContext')
        at Object.../../../../../devil/devilbox-new/data/www/wpshopify-components/components/cart/_state/context.js (public.73ad37.min.js?ver=5.8.2:1)
        at i (runtime.73ad37.min.js?ver=5.8.2:1)
        at Object.../../../../../devil/devilbox-new/data/www/wpshopify-components/common/hooks/index.js (public.73ad37.min.js?ver=5.8.2:1)
        at i (runtime.73ad37.min.js?ver=5.8.2:1)
        at Object.../../../../../devil/devilbox-new/data/www/wpshopify-components/index.js (public.73ad37.min.js?ver=5.8.2:1)
        at i (runtime.73ad37.min.js?ver=5.8.2:1)
        at Object../_tmp/public/js/app/app.js (public.73ad37.min.js?ver=5.8.2:1)
        at i (runtime.73ad37.min.js?ver=5.8.2:1)
        at t (public.73ad37.min.js?ver=5.8.2:1)
        at public.73ad37.min.js?ver=5.8.2:1

    Any idea how I can fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gavin310

    (@gavin310)

    I tracked it down to this line in the theme:

    wp_add_inline_script( 'global', 'var wp = { siteRoot: "' . get_site_url() . '", templateDir: "' . get_stylesheet_directory_uri() . '", pluginsDir: "' . plugins_url() . '", ajaxURL: "' . admin_url( 'admin-ajax.php' ) . '" };', true );

    • This reply was modified 3 years, 3 months ago by gavin310.
    Plugin Author andrewmrobbins

    (@andrewmrobbins)

    @gavin310

    Hey there,

    What did you change within that code to fix it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JavaScript errors when displaying products’ is closed to new replies.