Undefined variable: woocommerce_loop [closed]

As you have updated WooCommerce to latest version, templates you have in your theme must have gone outdated. (Not sure which previous version you had on your website before updating it to latest version).

Please check WP Admin -> WooCommerce -> System Status -> at bottom there will be section named “Templates” there you can see what templates you have are outdated, and update your templates in theme to reflect latest changes.

I am not sure if above snippet is complete code of your custom archive-product.php or not, but its definitely different than latest WooCommerce archive-product.php template.

And for the error you are seeing

does your template have this code?

global $product, $woocommerce_loop;

at top of template file, if not add it and your error will go away, but I will suggest you use latest template from WooCommerce plugin and apply your customization’s to it, to match your needs.