woocommerce / storefront

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

Avoid access to theme files directly #2071

Open kaushikasomaiya opened 1 year ago

kaushikasomaiya commented 1 year ago

Currently accessing theme files like index.php via direct URL results into fatal error:

Fatal error: Uncaught Error: Call to undefined function get_header() in /Applications/MAMP/htdocs/sites/wp-8831821/wp-content/themes/storefront/index.php

This should be silent like other themes (Ex: 2022)

Submitting as an enhancement request.

5709039-zen

gigitux commented 1 year ago

Could you share a specific use-case so that I can replicate it in my environment? Thanks!

kaushikasomaiya commented 1 year ago

@gigitux You can install Storefront, and try to access the following URL in your browser: yoursite.com/wp-content/themes/storefront/index.php

I don't see any issues with this though, which is why I filed as an enhancement request.

gigitux commented 1 year ago

Thanks! I'm able to reproduce it!

I don't see any issues with this though, which is why I filed as an enhancement request.

Thanks for the clarification. Since that Storefront is in maintenance mode, at least for now, we will not work on this issue.