woocommerce / storefront

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

Avoid access to theme files directly #2071

Open kaushikasomaiya opened 2 years ago

kaushikasomaiya commented 2 years 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 2 years ago

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

kaushikasomaiya commented 2 years 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 2 years 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.