get_id();
$terms = wp_get_post_terms( $product_id, $name, 'all' );
if ( ! empty( $terms ) ) {
if ( ! is_wp_error( $terms ) ) {
$tax = $terms[0]->taxonomy;
$tax_object = get_taxonomy( $tax );
if ( isset( $tax_object->labels->singular_name ) ) {
$out['label'] = $tax_object->labels->singular_name;
} elseif ( isset( $tax_object->label ) ) {
$out['label'] = $tax_object->label;
$label_prefix = __( 'Product', 'woocommerce-show-attributes' ) . ' ';
if ( 0 === strpos( $out['label'], $label_prefix ) ) {
$out['label'] = substr( $out['label'], strlen( $label_prefix ) );
}
}
$tax_terms = array();
foreach ( $terms as $term ) {
$single_term = esc_html( $term->name );
// Show terms as links?
if ( $single_product ) {
if ( get_option( 'wcsa_terms_as_links' ) == 'yes' ) {
$term_link = get_term_link( $term );
if ( ! is_wp_error( $term_link ) ) {
$single_term = '' . esc_html( $term->name ) . '';
}
}
}
array_push( $tax_terms, $single_term );
}
$out['value'] = implode( ', ', $tax_terms );
}
}
return $out;
}
endif;
foreach ( $items as $item_id => $item ) :
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
$product = $item->get_product();
$result_attributes = array();
?>
|
' );
// Product name
echo wp_kses_post( '' . $item->get_name() . '' );
// SKU
if ( $args['show_sku'] && is_object( $product ) && $product->get_sku() ) {
echo wp_kses_post( ' (#' . $product->get_sku() . ')' );
}
// allow other plugins to add additional product information here
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $args['plain_text'] );
// Display item meta data.
wc_display_item_meta( $item );
echo ( '' );
// Show title/image etc
if ( $args['show_image'] && is_object( $product ) ) {
echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', '', $item ) );
}
} else {
// Show title/image etc
if ( $args['show_image'] && is_object( $product ) ) {
echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', '', $item ) );
}
echo ( ' ' );
// Product name
echo wp_kses_post( '' . $item->get_name() . '' );
// SKU
if ( $args['show_sku'] && is_object( $product ) && $product->get_sku() ) {
echo wp_kses_post( ' (#' . $product->get_sku() . ')' );
}
// allow other plugins to add additional product information here
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $args['plain_text'] );
// Display item meta data.
wc_display_item_meta( $item );
echo ( ' ' );
}
// Display item download links.
if ( $args['show_download_links'] ) {
wc_display_item_downloads( $item );
}
// allow other plugins to add additional product information here
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $args['plain_text'] );
?>
|
get_quantity(), $item ) ); ?>
|
get_formatted_line_subtotal( $item ) ); ?>
|
get_purchase_note();
if ( ( 'customer_on_hold_order' === $this->template
|| 'customer_processing_order' === $this->template
|| 'customer_completed_order' === $this->template
|| 'customer_refunded_order' === $this->template
|| 'customer_invoice' === $this->template
|| 'customer_note' === $this->template )
&& isset( $args['show_purchase_note'] )
&& is_object( $product )
&& ! empty( $purchase_note )
) {
?>
|
|