woocommerce_payment_successful_result

woocommerce_payment_successful_result

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_payment_successful_result') is found 2 times:

  • /includes/class-wc-checkout.php line 1087
    		// Redirect to success/confirmation/payment page.
    		if ( isset( $result['result'] ) && 'success' === $result['result'] ) {
    			$result['order_id'] = $order_id;
    
    			$result = apply_filters( 'woocommerce_payment_successful_result', $result, $order_id );
    
    			if ( ! wp_doing_ajax() ) {
    				// phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
    				wp_redirect( $result['redirect'] );
    				exit;
    			}
    
  • /includes/class-wc-form-handler.php line 463
    							// Redirect to success/confirmation/payment page.
    							if ( isset( $result['result'] ) && 'success' === $result['result'] ) {
    								$result['order_id'] = $order_id;
    
    								$result = apply_filters( 'woocommerce_payment_successful_result', $result, $order_id );
    
    								wp_redirect( $result['redirect'] ); //phpcs:ignore WordPress.Security.SafeRedirect.wp_redirect_wp_redirect
    								exit;
    							}
    						}
    					} catch ( Exception $e ) {