Hi,
i found this in the error_log:
PHP Warning: Attempt to read property “ID” on null in /home/oamjpugt/look4hair.com/wp-content/themes/pro/cornerstone/includes/integration/woocommerce.php on line 613
the line corresponds to this line of code:
: $post->ID;
which is contained within this function:
public function detect_layout_type( $type ) {
// WC Archive
if ( is_woocommerce() && $this->is_wc_archive() ) {
// Search for shop can be set to is_shop if post_type=product
// This checks that it is in fact the shop page not the another archive
if (is_search() && is_shop() && !apply_filters(“cs_wc_archive_overwrite_search”, false)) {
// Check current page
$urlPage = x_get_page_by_current_path();
$post = get_post();
// Top level id
$id = !empty($urlPage)
? $urlPage->ID
: $post->ID;
// If it’s a search this can also be an archive
$shop_id = wc_get_page_id (‘shop’);
// Shop is not the current page
// And it’s a search
if ( $id !== $shop_id) {
return $type;
}
}
// Normal assignments
return ‘layout:archive-wc’;
}
if ( is_woocommerce() || is_cart() || is_checkout() || is_account_page() ) {
return ‘layout:single-wc’;
}
return $type;
}
How can I solve it?
Thank you very much