Status filter adjustment #13357

This commit is contained in:
Mike Jolley 2017-02-27 11:55:09 +00:00
parent 906b7dbf10
commit fce44e2271
1 changed files with 6 additions and 1 deletions

View File

@ -581,7 +581,12 @@ function wc_create_refund( $args = array() ) {
do_action( 'woocommerce_order_partially_refunded', $order->get_id(), $refund->get_id() );
} else {
do_action( 'woocommerce_order_fully_refunded', $order->get_id(), $refund->get_id() );
$order->update_status( apply_filters( 'woocommerce_order_fully_refunded_status', 'refunded', $order->get_id(), $refund->get_id() ) );
$parent_status = apply_filters( 'woocommerce_order_fully_refunded_status', 'refunded', $order->get_id(), $refund->get_id() );
if ( $parent_status ) {
$order->update_status( $parent_status );
}
}
}