Merge pull request #18703 from jimjasson/issue-18702

Remove multiple application of filter 'woocommerce_order_item_product'
This commit is contained in:
Mike Jolley 2018-01-31 14:13:10 +00:00 committed by GitHub
commit a12fe25bcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -390,7 +390,7 @@ class WC_Structured_Data {
continue;
}
$product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item );
$product = $order->get_product_from_item( $item );
$product_exists = is_object( $product );
$is_visible = $product_exists && $product->is_visible();

View File

@ -52,7 +52,7 @@ if ( $show_downloads ) {
do_action( 'woocommerce_order_details_before_order_table_items', $order );
foreach ( $order_items as $item_id => $item ) {
$product = apply_filters( 'woocommerce_order_item_product', $item->get_product(), $item );
$product = $item->get_product();
wc_get_template( 'order/order-details-item.php', array(
'order' => $order,