Merge pull request #19869 from rnaby/260418-102041-wc-checkout

process_order_payment method redundant else removed.
This commit is contained in:
Mike Jolley 2018-04-26 12:25:04 +01:00 committed by GitHub
commit 2be94d24e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 );
}
}