Fatal error: Uncaught Error:
Call to a member function get_id() on null in /public_html/site10/wp-content/themes/prorabs-dream/functions.php:444
Stack trace:
#0 /public_html/site10/wp-includes/class-wp-hook.php(287): pc_handler_woo_product_meta_end('')
#1 /public_html/site10/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#2 /public_html/site10/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /public_html/site10/wp-content/themes/prorabs-dream/woocommerce/cart/cart.php(66): do_action('cart_product_ca...')
#4 /public_html/site10/wp-content/plugins/woocommerce/includes/wc-core-functions.php(251): include('/home/k/...')
#5 /public_html/site10/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(99): wc_get_template('cart/cart.php')
#6 /public_html/site10/wp-content/themes/prorabs-dream/functions.php on line 444
Fatal error: Uncaught Error: Call to a member function get_id() on null in /home/k/mydomen/site.ru/public_html/site10/wp-content/themes/prorab/woocommerce/cart/cart.php:67 Stack trace: #0 /home/k/mydomen/site.ru/public_html/site10/wp-content/plugins/woocommerce/includes/wc-core-functions.php(251): include() #1 /home/k/mydomen/site.ru/public_html/site10/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-cart.php(99): wc_get_template('cart/cart.php') #2 /home/k/mydomen/site.ru/public_html/site10/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(72): WC_Shortcode_Cart::output(Array) #3 /home/k/mydomen/site.ru/public_html/site10/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php(85): WC_Shortcodes::shortcode_wrapper(Array) #4 /home/k/mydomen/site.ru/public_html/site10/wp-includes/shortcodes.php(343): WC_Shortcodes::cart('', '', 'woocommerce_car...') #5 [internal function]: do_shortcode_tag(Array) #6 /home/k/mydomen/site in /home/k/mydomen/site.ru/public_html/site10/wp-content/themes/prorab/woocommerce/cart/cart.php on line 67
global $product;
$hi_lines = get_unique_deep_term_ids( 'product_cat', $product->get_id() );
foreach ( $hi_lines as $key => $value ) {
$hi_lines[ $key ] = get_term_parents_list( $key, 'product_cat', $args = array( 'separator' => ' / ' ) );
}
echo '<div class="posted_in">' . _n( 'Category:', 'Categories:', count( $product->get_category_ids() ), 'woocommerce' ) . '<br>' . implode('<br>', $hi_lines) . '</div>'
<a href="image.jpg" data-fancybox="portfolio" data-caption="Описание слайда"> Наши работы</a>
<div style="display:none">
<a href="image2.jpg" data-fancybox="portfolio" data-caption="Описание слайда"></a>
<a href="image3.jpg" data-fancybox="portfolio" data-caption="Описание слайда"></a>
и т.д.
</div>
то в корзине возникает такая ошибка. И перестает работать на витрине.