WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

Onboarding::overwrite_paypal_redirect() public WC 1.0

Instead of redirecting back to the payment settings page, we will redirect back to the payments task list with our status.

{} It's a method of the class: Onboarding{}

No Hooks.

Return

String. URL of redirect.

Usage

$Onboarding = new Onboarding();
$Onboarding->overwrite_paypal_redirect( $location, $status );
$location(string) (required)
URL of redirect.
$status(int) (required)
HTTP response status code.

Code of Onboarding::overwrite_paypal_redirect() WC 5.2.2

<?php
public function overwrite_paypal_redirect( $location, $status ) {
	$settings_page = 'tab=checkout&section=ppec_paypal';
	if ( substr( $location, -strlen( $settings_page ) ) === $settings_page ) {
		$settings_array = (array) get_option( 'woocommerce_ppec_paypal_settings', array() );
		$connected      = isset( $settings_array['api_username'] ) && isset( $settings_array['api_password'] ) ? true : false;
		return wc_admin_url( '&task=payments&method=paypal&paypal-connect=' . $connected );
	}
	return $location;
}