Merge pull request #8516 from Sk-Shaikat/master

Refund deleted hook parameter fix
This commit is contained in:
Mike Jolley 2015-07-06 18:57:39 +02:00
commit fd6fd817a2
1 changed files with 3 additions and 2 deletions

View File

@ -2159,10 +2159,11 @@ class WC_AJAX {
$refund_id = absint( $_POST['refund_id'] );
if ( $refund_id && 'shop_order_refund' === get_post_type( $refund_id ) ) {
wc_delete_shop_order_transients( wp_get_post_parent_id( $refund_id ) );
$order_id = wp_get_post_parent_id( $refund_id );
wc_delete_shop_order_transients( $order_id );
wp_delete_post( $refund_id );
do_action( 'woocommerce_refund_deleted', $refund_id );
do_action( 'woocommerce_refund_deleted', $refund_id, $order_id );
}
die();