'single-meta'], blocksy_collect_and_return(function () { global $product; if ($product) { woocommerce_template_single_meta(); } }) ); }); } }, 39 ); add_action( 'woocommerce_before_single_product_summary', function () { echo '
'; global $product; if ($product->is_in_stock()) { if (get_theme_mod('has_product_single_onsale', 'yes') === 'yes') { woocommerce_show_product_sale_flash(); } } else { echo '' . __('Out of stock', 'blocksy') . ''; } }, 1 ); add_action( 'woocommerce_after_single_product_summary', function () { echo '
'; }, 1 ); remove_action('woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15); remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20); add_action( 'woocommerce_after_main_content', function () { if (is_product()) { woocommerce_upsell_display(); woocommerce_output_related_products(); } }, 5 ); function blocksy_woo_single_post_class($classes, $product) { if (! is_product()) { return $classes; } if (blocksy_woocommerce_has_flexy_view()) { if (count($product->get_gallery_image_ids()) > 0) { if (get_theme_mod('gallery_style', 'horizontal') === 'vertical') { $classes[] = 'thumbs-left'; } else { $classes[] = 'thumbs-bottom'; } } } if (get_theme_mod('has_product_sticky_summary', 'no') === 'yes') { $classes[] = 'sticky-summary'; } return $classes; } add_filter( 'woocommerce_post_class', 'blocksy_woo_single_post_class', 999, 2 ); add_action('woocommerce_post_class', function ($classes) { if (! is_product()) { return $classes; } global $blocksy_is_quick_view; if (! $blocksy_is_quick_view) { $classes[] = 'ct-default-gallery'; } return $classes; });