process_order_payment method redundant else removed.

This commit is contained in:
Khan M Rashedun-Naby 2018-04-26 10:24:31 +06:00
parent a04c54a896
commit c235d05446
1 changed files with 3 additions and 3 deletions

View File

@ -835,12 +835,12 @@ class WC_Checkout {
if ( isset( $result['result'] ) && 'success' === $result['result'] ) {
$result = apply_filters( 'woocommerce_payment_successful_result', $result, $order_id );
if ( is_ajax() ) {
wp_send_json( $result );
} else {
if ( ! is_ajax() ) {
wp_redirect( $result['redirect'] );
exit;
}
wp_send_json( $result );
}
}