theme_location && $item->description) $item_output = str_replace('', '' . $item->description . '', $item_output); return $item_output; } //add_filter('walker_nav_menu_start_el', 'blog99_header_menu_desc', 10, 4); remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20 ); add_filter( 'woocommerce_show_page_title', '__return_false' ); remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 ); remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 ); remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); function blog99_woocommerce_template_loop_product_thumbnail(){ ?>
is_on_sale() == 1 ){ $sale_class = 'new_sale'; } ?>
'.esc_html__('New','blog99').''; } if ( $product->is_on_sale() ) : echo apply_filters( 'woocommerce_sale_flash', '' . esc_html__( 'Sale!', 'blog99' ) . '', $post, $product ); endif; ?>

get_date_created() ); if ( ( time() - ( 60 * 60 * 24 * $newness_days ) ) > $created ) { echo '' . esc_html__( 'New!', 'blog99' ) . ''; } if ( $product->is_on_sale() ) : echo apply_filters( 'woocommerce_sale_flash', '' . esc_html__( 'Sale!', 'blog99' ) . '', $post, $product ); endif; ?>
get_rating_count(); $average = $product->get_average_rating(); if ( $rating_count > 0 ) : ?>
' . esc_html( $average ) . '', '5' ); ?> ' . esc_html( $rating_count ) . '' ); ?>
is_on_sale() ) { if ( ! $product->is_type( 'variable' ) and $product->get_regular_price() and $product->get_sale_price() ) { $max_percentage = ( ( $product->get_regular_price() - $product->get_sale_price() ) / $product->get_regular_price() ) * 100; } else { $max_percentage = 0; foreach ( $product->get_children() as $child_id ) { $variation = wc_get_product( $child_id ); $price = $variation->get_regular_price(); $sale = $variation->get_sale_price(); $percentage = ''; if ( $price != 0 && ! empty( $sale ) ) $percentage = ( $price - $sale ) / $price * 100; if ( $percentage > $max_percentage ) { $max_percentage = $percentage; } } } echo "" . esc_html( round( - $max_percentage ) ) . esc_html__("%", 'blog99').""; } } } function blog99_woocommerce_related_products_args( $args ) { $defaults = array( 'posts_per_page' => 6, 'columns' => 3, ); $args = wp_parse_args( $defaults, $args ); return $args; } add_filter( 'woocommerce_output_related_products_args', 'blog99_woocommerce_related_products_args' ); /** * Output product up sells. * * @param int $posts_per_page (default: -1) * @param int $columns (default: 2) */ remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); if ( ! function_exists( 'blog99_woocommerce_upsell_display' ) ) { function blog99_woocommerce_upsell_display() { woocommerce_upsell_display( 6, 3 ); } } add_action( 'woocommerce_after_single_product_summary', 'blog99_woocommerce_upsell_display', 15 ); /** * WooCommerce Compatibility File * * @link https://woocommerce.com/ * * @package Blog99 */ if ( ! function_exists( 'blog99_woocommerce_cart_link_fragment' ) ) { /** * Cart Fragments. * * Ensure cart contents update when products are added to the cart via AJAX. * * @param array $fragments Fragments to refresh via AJAX. * @return array Fragments to refresh via AJAX. */ function blog99_woocommerce_cart_link_fragment( $fragments ) { ob_start(); blog99_woocommerce_header_cart(); $fragments['li.site-header-cart'] = ob_get_clean(); return $fragments; } } add_filter( 'woocommerce_add_to_cart_fragments', 'blog99_woocommerce_cart_link_fragment' ); if ( ! function_exists( 'blog99_woocommerce_cart_link' ) ) { /** * Cart Link. * * Displayed a link to the cart including the number of items present and the cart total. * * @return void */ function blog99_woocommerce_cart_link() { ?>
  • cart->get_cart_contents_count(); ?>