Show non-existing product line items. Closes #2877
This commit is contained in:
parent
6f15a538d9
commit
d08b1679c8
|
@ -4,27 +4,38 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||
<tr class="item <?php if ( ! empty( $class ) ) echo $class; ?>" data-order_item_id="<?php echo $item_id; ?>">
|
||||
<td class="check-column"><input type="checkbox" /></td>
|
||||
<td class="thumb">
|
||||
<a href="<?php echo esc_url( admin_url( 'post.php?post=' . absint( $_product->id ) . '&action=edit' ) ); ?>" class="tips" data-tip="<?php
|
||||
<?php if ( $_product ) : ?>
|
||||
<a href="<?php echo esc_url( admin_url( 'post.php?post=' . absint( $_product->id ) . '&action=edit' ) ); ?>" class="tips" data-tip="<?php
|
||||
|
||||
echo '<strong>' . __( 'Product ID:', 'woocommerce' ) . '</strong> ' . absint( $item['product_id'] );
|
||||
echo '<strong>' . __( 'Product ID:', 'woocommerce' ) . '</strong> ' . absint( $item['product_id'] );
|
||||
|
||||
if ( $item['variation_id'] )
|
||||
echo '<br/><strong>' . __( 'Variation ID:', 'woocommerce' ) . '</strong> ' . absint( $item['variation_id'] );
|
||||
if ( $item['variation_id'] )
|
||||
echo '<br/><strong>' . __( 'Variation ID:', 'woocommerce' ) . '</strong> ' . absint( $item['variation_id'] );
|
||||
|
||||
if ( $_product->get_sku() )
|
||||
echo '<br/><strong>' . __( 'Product SKU:', 'woocommerce' ).'</strong> ' . esc_html( $_product->get_sku() );
|
||||
if ( $_product && $_product->get_sku() )
|
||||
echo '<br/><strong>' . __( 'Product SKU:', 'woocommerce' ).'</strong> ' . esc_html( $_product->get_sku() );
|
||||
|
||||
?>"><?php echo $_product->get_image( 'shop_thumbnail', array( 'title' => '' ) ); ?></a>
|
||||
?>"><?php echo $_product->get_image( 'shop_thumbnail', array( 'title' => '' ) ); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo woocommerce_placeholder_img( 'shop_thumbnail' ); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="name">
|
||||
|
||||
<?php if ( $_product->get_sku() ) echo esc_html( $_product->get_sku() ) . ' – '; ?>
|
||||
<?php if ( $_product && $_product->get_sku() ) echo esc_html( $_product->get_sku() ) . ' – '; ?>
|
||||
|
||||
<?php if ( $_product ) : ?>
|
||||
<a target="_blank" href="<?php echo esc_url( admin_url( 'post.php?post='. absint( $_product->id ) .'&action=edit' ) ); ?>">
|
||||
<?php echo esc_html( $item['name'] ); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo esc_html( $item['name'] ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<a target="_blank" href="<?php echo esc_url( admin_url( 'post.php?post='. absint( $_product->id ) .'&action=edit' ) ); ?>"><?php echo esc_html( $item['name'] ); ?></a>
|
||||
<input type="hidden" class="order_item_id" name="order_item_id[]" value="<?php echo esc_attr( $item_id ); ?>" />
|
||||
|
||||
<?php
|
||||
if ( isset( $_product->variation_data ) )
|
||||
if ( $_product && isset( $_product->variation_data ) )
|
||||
echo '<br/>' . woocommerce_get_formatted_variation( $_product->variation_data, true );
|
||||
?>
|
||||
<table class="meta" cellspacing="0">
|
||||
|
|
|
@ -366,8 +366,7 @@ function woocommerce_order_items_meta_box( $post ) {
|
|||
$_product = $order->get_product_from_item( $item );
|
||||
$item_meta = $order->get_item_meta( $item_id );
|
||||
|
||||
if ( $_product )
|
||||
include( 'order-item-html.php' );
|
||||
include( 'order-item-html.php' );
|
||||
break;
|
||||
case 'fee' :
|
||||
include( 'order-fee-html.php' );
|
||||
|
|
|
@ -181,6 +181,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - Fix saving of download permissions in order admin.
|
||||
* Fix - Action woocommerce_product_bulk_edit_end is now properly executed instead of outputted as HTML.
|
||||
* Fix - Fix IE Download via SSL bug and fix http file over SSL.
|
||||
* Fix - Show non-existing product line items.
|
||||
* Tweak - Added a check to parent theme for comments_template before loading plugin template.
|
||||
* Tweak - Remove hard coded max from random products widget.
|
||||
* Tweak - Add filter hook to the place order button for easy 3rd party manipulation.
|
||||
|
|
Loading…
Reference in New Issue