woocommerce / storefront

Official theme for WooCommerce
https://wordpress.org/themes/storefront/
960 stars 472 forks source link

Prevent infinite loop on prev/next product navigation #2053

Closed chrono-meter closed 1 year ago

chrono-meter commented 1 year ago

Is your feature request related to a problem? Please describe.

Storefront_WooCommerce_Adjacent_Products::get_product() has no execution time limit. So it may take huge execution time or enter infinite loop. In my environment, it causes by Simple Custom Post Order.

Describe the solution you'd like

Memo a previous adjacent ID for prevent infinite loop.

albarin commented 1 year ago

Hi @chrono-meter! Thanks for reporting this. Unfortunately, we haven't been able to reproduce the issue ourselves, could you provide more detailed steps to reproduce it so we can try to help? Thanks a lot!

danieldudzic commented 1 year ago

Hi @chrono-meter!

I have responded in: https://github.com/woocommerce/storefront/pull/2054#issuecomment-1290327110