Closed olegGist closed 6 years ago
+1 i have the same issuse
Thanks for reporting this! I'm able to reproduce this.
Why is your shop page empty? I can't find any documentation when you'd want to leave it empty and am curious to know why it is. That way, I can make a better judgment of the impact of the issue.
Closing due to inactivity. If this issue is still relevant, please reply with the requested information.
Same issue. PHP7.0 and PHP7.2. Error on woocommerce shop pages
Sorry for non response.
@benvaassen Shop is empty because i removed choose shop page in Woocomerce -> Setting -> Products
I did this beacuse i dont wanna allow preview all products on frontend in www.*****.pl/shop
@kanlukasz when I leave the shop page blank, I still get the preview of all products on the /shop page.
@benvaassen Hmm interesting. So maybe i did something wrong. I have to check it again. Sorry for the confusion.
EOT
Please give us a description of what happened.
I've meet a small issue related to plugin compatibility with WooCommerce. If system does not have shop page configured in WooCommerce > Settings > Products > General section ( when this option is empty ) following notice take a place:
Notice: Undefined property: WP_Post_Type::$ID in /www/wp-content/plugins/wordpress-seo/frontend/class-frontend.php on line 256
Please describe what you expected to happen and why.
Plugin should not try to get ID of shop page if it has not been added in WooCommerce settings section.
How can we reproduce this behavior?
Notice: Undefined property: WP_Post_Type::$ID in /www/wp-content/plugins/wordpress-seo/frontend/class-frontend.php on line 256
if WP_DEBUG option is on, otherwise check that php logs notices and any new notice has been added to php error log after this page visit.
Technical info
Links
Original report on Wordpress.org