Introduces the woocommerce_restock_refunded_item and woocommerce_order_refunded actions, closes #6922
This commit is contained in:
parent
9d7f14b2a4
commit
7e780a64b1
|
@ -1850,6 +1850,8 @@ class WC_AJAX {
|
|||
$new_quantity = $_product->increase_stock( $qty );
|
||||
|
||||
$order->add_order_note( sprintf( __( 'Item #%s stock increased from %s to %s.', 'woocommerce' ), $order_item['product_id'], $old_stock, $new_quantity ) );
|
||||
|
||||
do_action( 'woocommerce_restock_refunded_item', $_product->id, $old_stock, $new_quantity, $order );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1890,6 +1892,8 @@ class WC_AJAX {
|
|||
}
|
||||
}
|
||||
|
||||
do_action( 'woocommerce_order_refunded', $order_id, $refund->id );
|
||||
|
||||
// Clear transients
|
||||
wc_delete_shop_order_transients( $order_id );
|
||||
|
||||
|
|
Loading…
Reference in New Issue