WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

Onboarding::finish_paypal_connect() public WC 1.0

Finishes the PayPal connection process by saving the correct settings.

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

No Hooks.

Return

null. Nothing.

Usage

$Onboarding = new Onboarding();
$Onboarding->finish_paypal_connect();

Code of Onboarding::finish_paypal_connect() WC 5.3.0

<?php
public function finish_paypal_connect() {
	if (
		! Loader::is_admin_page() ||
		! isset( $_GET['paypal-connect-finish'] ) // phpcs:ignore CSRF ok.
	) {
		return;
	}

	if ( ! function_exists( 'wc_gateway_ppec' ) ) {
		return false;
	}

	// @todo This is a bit hacky but works. Ideally, woocommerce-gateway-paypal-express-checkout would contain a filter for us.
	add_filter( 'wp_redirect', array( $this, 'overwrite_paypal_redirect' ), 10, 2 );
	wc_gateway_ppec()->ips->maybe_received_credentials();
	remove_filter( 'wp_redirect', array( $this, 'overwrite_paypal_redirect' ) );
}