Blog Code Snippets PHP Wordpress

WordPress Plugin Error – Notice: Trying to get property of non-object in…

I’m getting this error in relation to the ‘Grid & List toggle for Woocommerce’ plugin, specifically this file:

/wp-content/plugins/grid-list-toggle-for-woocommerce/woocommerce_grid_list.php on line 115


Basically, the error was corrected by surrounding the code after global $post with the following statement:
if ( is_object( $post )) {


Click here for the corrected file.

Leave a Reply

Your email address will not be published. Required fields are marked *