=' ); } function before_container() { global $smof_data, $post; if( is_shop() ) { $pageID = get_option('woocommerce_shop_page_id'); } elseif( is_product_category() || is_product_tag() ) { $pageID = ''; } else { $pageID = $post->ID; } $custom_fields = get_post_custom_values('_wp_page_template', $pageID); if(is_array($custom_fields) && !empty($custom_fields)) { $page_template = $custom_fields[0]; } else { $page_template = ''; } $content_css = ''; $sidebar_css = ''; $sidebar_exists = true; $sidebar_left = ''; $double_sidebars = false; $sidebar_1 = get_post_meta( $pageID, 'sbg_selected_sidebar_replacement', true ); $sidebar_2 = get_post_meta( $pageID, 'sbg_selected_sidebar_2_replacement', true ); if( is_product() || is_shop() ) { if( $smof_data['woo_global_sidebar'] ) { if( $smof_data['woo_sidebar'] != 'None' ) { $sidebar_1 = array( $smof_data['woo_sidebar'] ); } else { $sidebar_1 = ''; } if( $smof_data['woo_sidebar_2'] != 'None' ) { $sidebar_2 = array( $smof_data['woo_sidebar_2'] ); } else { $sidebar_2 = ''; } } } if( ( is_array( $sidebar_1 ) && $sidebar_1[0] ) && ( is_array( $sidebar_2 ) && $sidebar_2[0] ) ) { $double_sidebars = true; } if( is_array( $sidebar_1 ) && ( $sidebar_1[0] || $sidebar_1[0] === '0' ) ) { $sidebar_exists = true; } else { $sidebar_exists = false; } if( is_product_category() || is_product_tag() ) { $sidebar_1 = $smof_data['woocommerce_archive_sidebar']; $sidebar_2 = $smof_data['woocommerce_archive_sidebar_2']; if( $sidebar_1 != 'None' && $sidebar_2 != 'None' ) { $double_sidebars = true; } if( $sidebar_1 == 'None' ) { $sidebar_exists = false; } else { $sidebar_exists = true; } } if( $page_template == '100-width.php' ) { $content_css = 'width:100%'; $sidebar_css = 'display:none'; } elseif( ! $sidebar_exists ) { $content_css = 'width:100%'; $sidebar_css = 'display:none'; $sidebar_exists = false; } elseif(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } elseif(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'default' || ! metadata_exists( 'post', $pageID, 'pyre_sidebar_position' )) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_exists = true; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_exists = true; $sidebar_left = 2; } } if(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $sidebar_left = 2; } if( $smof_data['woo_global_sidebar'] ) { if( is_product() || is_shop() ) { if( $smof_data['woo_sidebar'] != 'None' ) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if( $smof_data['woo_sidebar'] != 'None' && $smof_data['woo_sidebar_2'] != 'None' ) { $double_sidebars = true; } } if( is_product_category() || is_product_tag() ) { if( $smof_data['woocommerce_archive_sidebar'] != 'None' ) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if( $smof_data['woocommerce_archive_sidebar'] != 'None' && $smof_data['woocommerce_archive_sidebar_2'] != 'None' ) { $double_sidebars = true; } } } if( is_product_category() || is_product_tag() ) { if( $smof_data['woocommerce_archive_sidebar'] != 'None' ) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if( $smof_data['woocommerce_archive_sidebar'] != 'None' && $smof_data['woocommerce_archive_sidebar_2'] != 'None' ) { $double_sidebars = true; } } if($double_sidebars == true) { $content_css = 'float:left;'; $sidebar_css = 'float:left;'; $sidebar_2_css = 'float:left;'; } else { $sidebar_left = 1; } if( is_product() || is_shop() ) { if( $smof_data['woo_global_sidebar'] ) { if( $smof_data['woo_sidebar'] != 'None' ) { $sidebar_1 = $smof_data['woo_sidebar']; } if( $smof_data['woo_sidebar_2'] != 'None' ) { $sidebar_2 = $smof_data['woo_sidebar_2']; } } else { $sidebar_1 = '0'; $sidebar_2 = '0'; } } echo '
'; } function shop_title() { return false; } function after_container() { echo '
'; } function add_sidebar() { global $smof_data, $post; if( is_shop() ) { $pageID = get_option('woocommerce_shop_page_id'); } elseif( is_product_category() || is_product_tag() ) { $pageID = ''; } else { $pageID = $post->ID; } $custom_fields = get_post_custom_values('_wp_page_template', $pageID); if(is_array($custom_fields) && !empty($custom_fields)) { $page_template = $custom_fields[0]; } else { $page_template = ''; }; $content_css = ''; $sidebar_css = ''; $sidebar_2_css = ''; $sidebar_exists = true; $sidebar_left = ''; $double_sidebars = false; $sidebar_1 = get_post_meta( $pageID, 'sbg_selected_sidebar_replacement', true ); $sidebar_2 = get_post_meta( $pageID, 'sbg_selected_sidebar_2_replacement', true ); if( is_product() || is_shop() ) { if( $smof_data['woo_global_sidebar'] ) { if( $smof_data['woo_sidebar'] != 'None' ) { $sidebar_1 = array( $smof_data['woo_sidebar'] ); } else { $sidebar_1 = ''; } if( $smof_data['woo_sidebar_2'] != 'None' ) { $sidebar_2 = array( $smof_data['woo_sidebar_2'] ); } else { $sidebar_2 = ''; } } } if( ( is_array( $sidebar_1 ) && $sidebar_1[0] ) && ( is_array( $sidebar_2 ) && $sidebar_2[0] ) ) { $double_sidebars = true; } if( is_array( $sidebar_1 ) && ( $sidebar_1[0] || $sidebar_1[0] === '0' ) ) { $sidebar_exists = true; } else { $sidebar_exists = false; } if( is_product_category() || is_product_tag() ) { $sidebar_1 = $smof_data['woocommerce_archive_sidebar']; $sidebar_2 = $smof_data['woocommerce_archive_sidebar_2']; if( $sidebar_1 != 'None' && $sidebar_2 != 'None' ) { $double_sidebars = true; } if( $sidebar_1 == 'None' ) { $sidebar_exists = false; } else { $sidebar_exists = true; } } if( $page_template == '100-width.php' ) { $content_css = 'width:100%'; $sidebar_css = 'display:none'; } elseif( ! $sidebar_exists ) { $content_css = 'width:100%'; $sidebar_css = 'display:none'; $sidebar_exists = false; } elseif(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } elseif(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'default' || ! metadata_exists( 'post', $pageID, 'pyre_sidebar_position' )) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_exists = true; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_exists = true; $sidebar_left = 2; } } if(get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $sidebar_left = 2; } if( $smof_data['woo_global_sidebar'] ) { if( is_product() || is_shop() ) { if( $smof_data['woo_sidebar'] != 'None' ) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if( $smof_data['woo_sidebar'] != 'None' && $smof_data['woo_sidebar_2'] != 'None' ) { $double_sidebars = true; } } if( is_product_category() || is_product_tag() ) { if( $smof_data['woocommerce_archive_sidebar'] != 'None' ) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if( $smof_data['woocommerce_archive_sidebar'] != 'None' && $smof_data['woocommerce_archive_sidebar_2'] != 'None' ) { $double_sidebars = true; } } } if( is_product_category() || is_product_tag() ) { if( $smof_data['woocommerce_archive_sidebar'] != 'None' ) { if($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if( $smof_data['woocommerce_archive_sidebar'] != 'None' && $smof_data['woocommerce_archive_sidebar_2'] != 'None' ) { $double_sidebars = true; } } if($double_sidebars == true) { $content_css = 'float:left;'; $sidebar_css = 'float:left;'; $sidebar_2_css = 'float:left;'; } else { $sidebar_left = 1; } if( is_product() || is_shop() ) { if( $smof_data['woo_global_sidebar'] ) { if( $smof_data['woo_sidebar'] != 'None' ) { $sidebar_1 = $smof_data['woo_sidebar']; } if( $smof_data['woo_sidebar_2'] != 'None' ) { $sidebar_2 = $smof_data['woo_sidebar_2']; } } else { if( ( is_array( $sidebar_1 ) && $sidebar_1[0] != '' ) ) { $sidebar_1 = $sidebar_1[0]; } if( ( is_array( $sidebar_2 ) && $sidebar_2[0] != '' ) ) { $sidebar_2 = $sidebar_2[0]; } } } if( $sidebar_exists == true ) { echo ''; if( $double_sidebars == true ) { echo ''; } } } function before_shop_item_buttons() { echo '
'; } function after_shop_item_buttons() { echo '' . __( 'Details', 'Avada' ) . '
'; } function add_product_border() { echo '
'; } } // end FusionTemplateWoo() class } new FusionTemplateWoo(); global $smof_data; add_filter( 'get_product_search_form' , 'avada_product_search_form' ); function avada_product_search_form( $form ) { $form = ''; return $form; } remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 ); remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); if( ! $smof_data['woocommerce_avada_ordering'] ) { remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); add_action('woocommerce_before_shop_loop', 'avada_woocommerce_catalog_ordering', 30); } function avada_woocommerce_catalog_ordering() { global $smof_data; if ( isset( $_SERVER['QUERY_STRING'] ) ) { parse_str($_SERVER['QUERY_STRING'], $params); $query_string = '?'.$_SERVER['QUERY_STRING']; } else { $query_string = ''; } // replace it with theme option if($smof_data['woo_items']) { $per_page = $smof_data['woo_items']; } else { $per_page = 12; } $pob = !empty($params['product_orderby']) ? $params['product_orderby'] : 'default'; if( ! empty( $params['product_order'] ) ) { $po = $params['product_order']; } else { switch($pob) { case 'date': $po = 'desc'; break; case 'price': $po = 'asc'; break; case 'popularity': $po = 'asc'; break; case 'rating': $po = 'desc'; break; case 'name': $po = 'asc'; break; case 'default': $po = 'asc'; break; } } $pc = !empty($params['product_count']) ? $params['product_count'] : $per_page; $html = ''; $html .= '
'; $html .= '
'; $html .= ''; $html .= ''; $html .= '
'; $html .= ''; $html .= '
'; echo $html; } if( ! $smof_data['woocommerce_avada_ordering'] ) { add_action('woocommerce_get_catalog_ordering_args', 'avada_woocommerce_get_catalog_ordering_args', 20); } function avada_woocommerce_get_catalog_ordering_args($args) { global $woocommerce; if ( isset( $_SERVER['QUERY_STRING'] ) ) { parse_str($_SERVER['QUERY_STRING'], $params); } $pob = !empty($params['product_orderby']) ? $params['product_orderby'] : 'default'; $po = !empty($params['product_order']) ? $params['product_order'] : 'asc'; switch($pob) { case 'date': $orderby = 'date'; $order = 'desc'; $meta_key = ''; break; case 'price': $orderby = 'meta_value_num'; $order = 'asc'; $meta_key = '_price'; break; case 'popularity': $orderby = 'meta_value_num'; $order = 'asc'; $meta_key = 'total_sales'; break; case 'rating': $orderby = 'meta_value_num'; $order = 'desc'; $meta_key = 'average_rating'; break; case 'name': $orderby = 'title'; $order = 'asc'; $meta_key = ''; break; case 'default': return $args; break; } switch($po) { case 'desc': $order = 'desc'; break; case 'asc': $order = 'asc'; break; default: $order = 'asc'; break; } $args['orderby'] = $orderby; $args['order'] = $order; $args['meta_key'] = $meta_key; if( $pob == 'rating' ) { $args['orderby'] = 'menu_order title'; $args['order'] = $po == 'desc' ? 'desc' : 'asc'; $args['order'] = strtoupper( $args['order'] ); $args['meta_key'] = ''; add_filter( 'posts_clauses', 'fusion_order_by_rating_post_clauses' ); } return $args; } /** * fusion_order_by_rating_post_clauses function. * * @access public * @param array $args * @return array */ function fusion_order_by_rating_post_clauses( $args ) { global $wpdb; $args['fields'] .= ", AVG( $wpdb->commentmeta.meta_value ) as average_rating, SUM( $wpdb->comments.comment_approved ) as sum_of_comments_approved "; $args['where'] .= " AND ( $wpdb->commentmeta.meta_key = 'rating' OR $wpdb->commentmeta.meta_key IS null ) "; //$args['where'] .= " AND $wpdb->comments.comment_approved = 1"; $args['join'] .= " LEFT OUTER JOIN $wpdb->comments ON($wpdb->posts.ID = $wpdb->comments.comment_post_ID) LEFT JOIN $wpdb->commentmeta ON($wpdb->comments.comment_ID = $wpdb->commentmeta.comment_id) "; if ( isset( $_SERVER['QUERY_STRING'] ) ) { parse_str($_SERVER['QUERY_STRING'], $params); } $order = ! empty($params['product_order']) ? $params['product_order'] : 'desc'; $order = strtoupper($order); $args['orderby'] = "sum_of_comments_approved DESC, average_rating {$order}, $wpdb->posts.post_date DESC"; $args['groupby'] = "$wpdb->posts.ID"; return $args; } add_filter('loop_shop_per_page', 'avada_loop_shop_per_page'); function avada_loop_shop_per_page() { global $smof_data; if ( isset( $_SERVER['QUERY_STRING'] ) ) { parse_str($_SERVER['QUERY_STRING'], $params); } if($smof_data['woo_items']) { $per_page = $smof_data['woo_items']; } else { $per_page = 12; } $pc = !empty($params['product_count']) ? $params['product_count'] : $per_page; return $pc; } add_action('woocommerce_before_shop_loop_item_title', 'avada_woocommerce_thumbnail', 10); remove_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10); function avada_woocommerce_thumbnail() { global $product, $woocommerce; $items_in_cart = array(); if($woocommerce->cart->get_cart() && is_array($woocommerce->cart->get_cart())) { foreach($woocommerce->cart->get_cart() as $cart) { $items_in_cart[] = $cart['product_id']; } } $id = get_the_ID(); $in_cart = in_array($id, $items_in_cart); $size = 'shop_catalog'; $gallery = get_post_meta($id, '_product_image_gallery', true); $attachment_image = ''; if(!empty($gallery)) { $gallery = explode(',', $gallery); $first_image_id = $gallery[0]; $attachment_image = wp_get_attachment_image($first_image_id , $size, false, array('class' => 'hover-image')); } $thumb_image = get_the_post_thumbnail($id , $size); if($attachment_image) { $classes = 'crossfade-images'; } else { $classes = ''; } echo ''; echo $attachment_image; echo $thumb_image; if($in_cart) { echo ''; } else { echo ''; } echo ''; } add_filter('add_to_cart_fragments', 'avada_woocommerce_header_add_to_cart_fragment'); function avada_woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?>
  • cart->cart_contents_count): ?> cart->cart_contents_count; ?> - cart->subtotal); ?>
    cart->cart_contents as $cart_item): ?>
  • cart->cart_contents_count): ?>
    cart->cart_contents as $cart_item): ?>
  • '; } add_action( 'woocommerce_single_product_summary', 'avada_woocommerce_single_product_summary_close', 100 ); function avada_woocommerce_single_product_summary_close() { echo ''; } add_action('woocommerce_after_single_product_summary', 'avada_woocommerce_after_single_product_summary', 15); function avada_woocommerce_after_single_product_summary() { global $smof_data; $nofollow = ''; if($smof_data['nofollow_social_links']) { $nofollow = ' rel="nofollow"'; } $social = '
    '; if($smof_data['woocommerce_social_links']) { $social .= ''; echo $social; } } remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); add_action('woocommerce_after_single_product_summary', 'avada_woocommerce_output_related_products', 15); function avada_woocommerce_output_related_products() { global $post, $smof_data; if( get_post_meta($post->ID, 'pyre_number_of_related_products', true) == 'default' || get_post_meta($post->ID, 'pyre_number_of_related_products', true) == '' || ! get_post_meta($post->ID, 'pyre_number_of_related_products', true) ) { $number_of_columns = $smof_data['woocommerce_related_columns']; } else { $number_of_columns = get_post_meta($post->ID, 'pyre_number_of_related_products', true); } $args = array( 'posts_per_page' => $number_of_columns, 'columns' => $number_of_columns, 'orderby' => 'rand' ); woocommerce_related_products( apply_filters( 'woocommerce_output_related_products_args', $args ) ); } remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); add_action('woocommerce_after_single_product_summary', 'avada_woocommerce_upsell_display', 10); function avada_woocommerce_upsell_display() { global $product, $woocommerce_loop, $post, $smof_data; $upsells = $product->get_upsells(); if ( sizeof( $upsells ) == 0 ) return; if( get_post_meta($post->ID, 'pyre_number_of_related_products', true) == 'default' || get_post_meta($post->ID, 'pyre_number_of_related_products', true) == '' || ! get_post_meta($post->ID, 'pyre_number_of_related_products', true) ) { $number_of_columns = $smof_data['woocommerce_related_columns']; } else { $number_of_columns = get_post_meta($post->ID, 'pyre_number_of_related_products', true); } woocommerce_upsell_display( -1, $number_of_columns ); } /* variations hooks */ /* end variations hooks */ /* cart hooks */ add_action('woocommerce_before_cart_table', 'avada_woocommerce_before_cart_table', 20); function avada_woocommerce_before_cart_table( $args ) { global $woocommerce; $html = '
    '; $html .= '

    ' . sprintf( __( 'You Have %d Items In Your Cart', 'Avada' ), $woocommerce->cart->cart_contents_count ) . '

    '; echo $html; } add_action('woocommerce_after_cart_table', 'avada_woocommerce_after_cart_table', 20); function avada_woocommerce_after_cart_table($args) { $html = '
    '; echo $html; } function woocommerce_cross_sell_display( $posts_per_page = 3, $columns = 3, $orderby = 'rand' ) { wc_get_template( 'cart/cross-sells.php', array( 'posts_per_page' => $posts_per_page, 'orderby' => $orderby, 'columns' => $columns ) ); } function cart_shipping_calc() { // Move this code to ~/woocommerce/cart/shipping-calculator.php and move the hook call accordingly. global $woocommerce, $smof_data; if ( get_option( 'woocommerce_enable_shipping_calc' ) === 'no' || ! WC()->cart->needs_shipping() ) { return; } ?>

    customer->get_shipping_country(); $current_r = WC()->customer->get_shipping_state(); $states = WC()->countries->get_states( $current_cc ); // Hidden Input if ( is_array( $states ) && empty( $states ) ) { ?>

    cart->coupons_enabled() ) { ?>

    cart->get_cross_sells(); if ( sizeof( $crosssells ) == 0 ) return; $number_of_columns = $smof_data['woocommerce_related_columns']; woocommerce_cross_sell_display( apply_filters( 'woocommerce_cross_sells_total', -1 ), $number_of_columns ); } /* end cart hooks */ /* begin checkout hooks */ remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); add_action( 'woocommerce_before_checkout_form', 'avada_woocommerce_checkout_coupon_form', 10 ); function avada_woocommerce_checkout_coupon_form($args) { global $woocommerce; if ( ! WC()->cart->coupons_enabled() ) return; ?>

    cart->needs_shipping() && ! WC()->cart->ship_to_billing_address_only() || apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) === 'yes' ) && ( ! WC()->cart->needs_shipping() || WC()->cart->ship_to_billing_address_only() ) ) { return; } else { ?>
    cart->needs_shipping() && ! WC()->cart->ship_to_billing_address_only() || apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) === 'yes' ) && ( ! WC()->cart->needs_shipping() || WC()->cart->ship_to_billing_address_only() ) ) { ?>
    cart->needs_shipping() && ! WC()->cart->ship_to_billing_address_only() || apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) === 'yes' ) && ( ! WC()->cart->needs_shipping() || WC()->cart->ship_to_billing_address_only() ) ) { $data_name = 'col-2'; } else { $data_name = '#order_review'; } if( ! $smof_data['woocommerce_one_page_checkout'] ) { ?>

    display_name ); ?>

    get_order_item_totals() ) foreach ( $totals as $total ) : ?> get_items() ) > 0 ) { foreach( $order->get_items() as $item ) { $_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item ); $item_meta = new WC_Order_Item_Meta( $item['item_meta'] ); ?> status, array( 'processing', 'completed' ) ) && ( $purchase_note = get_post_meta( $_product->id, '_purchase_note', true ) ) ) { ?>
     
    get_image() ); if ( ! $_product->is_visible() ) echo $thumbnail; else printf( '%s', $_product->get_permalink(), $thumbnail ); ?>
    is_visible() ) echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item ); else echo apply_filters( 'woocommerce_order_item_name', sprintf( '%s', get_permalink( $item['product_id'] ), $item['name'] ), $item ); $item_meta->display(); if ( $_product && $_product->exists() && $_product->is_downloadable() && $order->is_download_permitted() ) { $download_files = $order->get_item_downloads( $item ); $i = 0; $links = array(); foreach ( $download_files as $download_id => $file ) { $i++; $links[] = '' . sprintf( __( 'Download file%s', 'woocommerce' ), ( count( $download_files ) > 1 ? ' ' . $i . ': ' : ': ' ) ) . esc_html( $file['name'] ) . ''; } echo '
    ' . implode( '
    ', $links ); } ?>
    get_formatted_line_subtotal( $item ); ?>

    billing_email ) echo '
    ' . __( 'Email:', 'woocommerce' ) . '
    ' . $order->billing_email . '

    '; if ( $order->billing_phone ) echo '
    ' . __( 'Telephone:', 'woocommerce' ) . '
    ' . $order->billing_phone . '
    '; // Additional customer details hook do_action( 'woocommerce_order_details_after_customer_details', $order ); ?>

    get_formatted_billing_address() ) _e( 'N/A', 'woocommerce' ); else echo $order->get_formatted_billing_address(); ?>

    get_formatted_shipping_address() ) _e( 'N/A', 'woocommerce' ); else echo $order->get_formatted_shipping_address(); ?>