cart->get_cart_url(); echo ''; } } /** * Display category title */ function belise_woocommerce_page_title( $echo = true ) { if ( is_search() ) { /* translators: %s: search query */ $page_title = sprintf( esc_html__( 'Search Results: “%s”', 'belise-lite' ), get_search_query() ); if ( get_query_var( 'paged' ) ) { /* translators: %s: page number */ $page_title .= sprintf( esc_html__( ' – Page %s', 'belise-lite' ), get_query_var( 'paged' ) ); } } elseif ( is_tax() ) { $page_title = single_term_title( '', false ); } else { if ( function_exists( 'wc_get_page_id' ) ) { $shop_page_id = wc_get_page_id( 'shop' ); if ( ! empty( $shop_page_id ) ) { $page_title = get_the_title( $shop_page_id ); } } } $page_title = apply_filters( 'belise_woocommerce_page_title', $page_title ); if ( $echo ) { echo esc_html( $page_title ); } else { return $page_title; } } /** * Hide shop title */ function belise_woocommerce_hide_page_title() { return false; } /** * Change the layout before the shop page main content */ function belise_woocommerce_before_main_content() { ?>
'370', 'height' => '270', 'crop' => 1, ); $single = array( 'width' => '550', 'height' => '550', 'crop' => 1, ); $thumbnail = array( 'width' => '120', 'height' => '120', 'crop' => 0, ); update_option( 'shop_catalog_image_size', $catalog ); update_option( 'shop_single_image_size', $single ); update_option( 'shop_thumbnail_image_size', $thumbnail ); } /** * Change the layout of the thumbnail on single product listing */ function belise_woocommerce_template_loop_product_thumbnail() { ?>

get_price_html(); if ( ! empty( $product_price ) ) { echo '
' . wp_kses_post( $product_price ) . '
'; } ?>
esc_html__( 'Prev page', 'belise-lite' ), 'next_text' => esc_html__( 'Next page', 'belise-lite' ), ) ); } /** * Shop page description on product archives */ function belise_woocommerce_template_single_excerpt() { global $post; if ( ! $post->post_excerpt ) { return; } ?>
post_excerpt ); ?>
'; global $product; /* Related Products */ if ( function_exists( 'wc_get_related_products' ) ) { $prod_id = get_the_ID(); $related = wc_get_related_products( $prod_id ); } else { $related = $product->get_related(); } if ( ! empty( $related ) && (count( $related ) > 0) ) { $belise_related_items = array( 'posts_per_page' => 3, ); echo ''; } /* Upsells */ if ( function_exists( 'method_exists' ) && method_exists( $product, 'get_upsell_ids' ) ) { $upsells = $product->get_upsell_ids(); } else { $upsells = $product->get_upsells(); } if ( ! empty( $upsells ) && (count( $upsells ) > 0) ) { $belise_upsell_items = 3; echo '
'; woocommerce_upsell_display( $belise_upsell_items ); echo '
'; echo '
'; } } /** * Move coupon after table */ function belise_coupon_after_order_table_js() { wc_enqueue_js( ' $( $( ".woocommerce-info, .checkout_coupon" ).detach() ).appendTo( "#belise-checkout-coupon" ); ' ); } /** * Move coupon after table */ function belise_coupon_after_order_table() { echo '
'; } /** * Remove social sharing */ function belise_woocommerce_social_sharing() { remove_action( 'woocommerce_share', 'jetpack_woocommerce_social_share_icons', 10 ); } /** * Remove breadcrumb on shop category */ function belise_woocommerce_breadcrumb_display() { $woocommerce_breadcrumb = get_theme_mod( 'belise_woocommerce_breadcrumb_display', false ); if ( (bool) $woocommerce_breadcrumb === false ) { remove_action( 'woocommerce_before_main_content','woocommerce_breadcrumb', 20 ); } } /** * Remove ordering on shop category */ function belise_woocommerce_ordering_display() { $woocommerce_ordering = get_theme_mod( 'belise_woocommerce_ordering_display', false ); if ( (bool) $woocommerce_ordering === false ) { remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); } } /** * Remove product tabs on single */ function belise_woocommerce_product_tabs( $tabs ) { $woocommerce_tabs = get_theme_mod( 'belise_woocommerce_tabs_display', false ); if ( (bool) $woocommerce_tabs === false ) { unset( $tabs['description'] ); unset( $tabs['reviews'] ); unset( $tabs['additional_information'] ); } else { $tabs['description']; $tabs['reviews']; $tabs['additional_information']; } return $tabs; } ?>