With Slugs enabled Woocommerce dont show 404 page for products #1250
-
If Slugs enabled ( new extension or old slugs plugin ) Woocommerce does not show 404 page for missing products. If product missing site go to Shop page. But must show 404 page if product missing. Its bad for SEO. How remove redirect to shop page ? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
I found : If Slug extension dont find product hi make global wp->is_archive is true . When wp dont show 404 page. You can debug it in class-wp.php line 736 and found is_post_type_archive()= true.
Why is_archive is true ? this is product. |
Beta Was this translation helpful? Give feedback.
-
File modules/slugs/includes/class-qtranslate-slug.php - https://bit.ly/3THqk0C module create QUERY and wordpress find archive here file class-wp-query.php - https://bit.ly/3TTptdD Becouse $post_type_obj has : has_archive="shop" , wp think what is archive page and dont show 404 page - https://bit.ly/3EyHwkA What write here: https://bit.ly/3THqk0C I try, but ugly result - |
Beta Was this translation helpful? Give feedback.
-
There is a solution but not a beautiful one. Please make normal solution for this.
|
Beta Was this translation helpful? Give feedback.
-
Moved to issues (#1260) , where it belongs. |
Beta Was this translation helpful? Give feedback.
Moved to issues (#1260) , where it belongs.