Merge branch 'pr/17315'
This commit is contained in:
commit
349e37399f
|
@ -11,12 +11,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
class WC_Deprecated_Action_Hooks extends WC_Deprecated_Hooks {
|
class WC_Deprecated_Action_Hooks extends WC_Deprecated_Hooks {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of deprecated hooks we need to handle.
|
* Array of deprecated hooks we need to handle. Format of 'new' => 'old'.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $deprecated_hooks = array(
|
protected $deprecated_hooks = array(
|
||||||
'woocommerce_new_order_item' => array(
|
'woocommerce_new_order_item' => array(
|
||||||
'woocommerce_order_add_shipping',
|
'woocommerce_order_add_shipping',
|
||||||
'woocommerce_order_add_coupon',
|
'woocommerce_order_add_coupon',
|
||||||
'woocommerce_order_add_tax',
|
'woocommerce_order_add_tax',
|
||||||
|
@ -25,15 +25,16 @@ class WC_Deprecated_Action_Hooks extends WC_Deprecated_Hooks {
|
||||||
'woocommerce_add_order_item_meta',
|
'woocommerce_add_order_item_meta',
|
||||||
'woocommerce_add_order_fee_meta',
|
'woocommerce_add_order_fee_meta',
|
||||||
),
|
),
|
||||||
'woocommerce_update_order_item' => array(
|
'woocommerce_update_order_item' => array(
|
||||||
'woocommerce_order_edit_product',
|
'woocommerce_order_edit_product',
|
||||||
'woocommerce_order_update_coupon',
|
'woocommerce_order_update_coupon',
|
||||||
'woocommerce_order_update_shipping',
|
'woocommerce_order_update_shipping',
|
||||||
'woocommerce_order_update_fee',
|
'woocommerce_order_update_fee',
|
||||||
'woocommerce_order_update_tax',
|
'woocommerce_order_update_tax',
|
||||||
),
|
),
|
||||||
'woocommerce_new_payment_token' => 'woocommerce_payment_token_created',
|
'woocommerce_new_payment_token' => 'woocommerce_payment_token_created',
|
||||||
'woocommerce_new_product_variation' => 'woocommerce_create_product_variation',
|
'woocommerce_new_product_variation' => 'woocommerce_create_product_variation',
|
||||||
|
'woocommerce_order_details_after_order_table_items' => 'woocommerce_order_items_table'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* @see https://docs.woocommerce.com/document/template-structure/
|
* @see https://docs.woocommerce.com/document/template-structure/
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
* @package WooCommerce/Templates
|
* @package WooCommerce/Templates
|
||||||
* @version 3.2.0
|
* @version 3.3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
@ -34,6 +34,8 @@ if ( $show_downloads ) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<section class="woocommerce-order-details">
|
<section class="woocommerce-order-details">
|
||||||
|
<?php do_action( 'woocommerce_order_details_before_order_table', $order ); ?>
|
||||||
|
|
||||||
<h2 class="woocommerce-order-details__title"><?php _e( 'Order details', 'woocommerce' ); ?></h2>
|
<h2 class="woocommerce-order-details__title"><?php _e( 'Order details', 'woocommerce' ); ?></h2>
|
||||||
|
|
||||||
<table class="woocommerce-table woocommerce-table--order-details shop_table order_details">
|
<table class="woocommerce-table woocommerce-table--order-details shop_table order_details">
|
||||||
|
@ -47,20 +49,23 @@ if ( $show_downloads ) {
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $order_items as $item_id => $item ) {
|
do_action( 'woocommerce_order_details_before_order_table_items', $order );
|
||||||
$product = apply_filters( 'woocommerce_order_item_product', $item->get_product(), $item );
|
|
||||||
|
|
||||||
wc_get_template( 'order/order-details-item.php', array(
|
foreach ( $order_items as $item_id => $item ) {
|
||||||
'order' => $order,
|
$product = apply_filters( 'woocommerce_order_item_product', $item->get_product(), $item );
|
||||||
'item_id' => $item_id,
|
|
||||||
'item' => $item,
|
wc_get_template( 'order/order-details-item.php', array(
|
||||||
'show_purchase_note' => $show_purchase_note,
|
'order' => $order,
|
||||||
'purchase_note' => $product ? $product->get_purchase_note() : '',
|
'item_id' => $item_id,
|
||||||
'product' => $product,
|
'item' => $item,
|
||||||
) );
|
'show_purchase_note' => $show_purchase_note,
|
||||||
}
|
'purchase_note' => $product ? $product->get_purchase_note() : '',
|
||||||
|
'product' => $product,
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
|
||||||
|
do_action( 'woocommerce_order_details_after_order_table_items', $order );
|
||||||
?>
|
?>
|
||||||
<?php do_action( 'woocommerce_order_items_table', $order ); ?>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
|
|
Loading…
Reference in New Issue