Use connection tab in some URLs instead of paypal tab

This commit is contained in:
Alex P 2022-09-26 10:44:25 +03:00
parent e27efcd363
commit 7002c2e6d3
3 changed files with 5 additions and 3 deletions

View file

@ -60,7 +60,7 @@ class ConnectAdminNotice {
'PayPal Payments is almost ready. To get started, <a href="%1$s">connect your account</a>.',
'woocommerce-paypal-payments'
),
admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' )
admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway&ppcp-tab=' . Settings::CONNECTION_TAB_ID )
);
return new Message( $message, 'warning' );
}

View file

@ -196,7 +196,7 @@ class SettingsListener {
/**
* The URL opened at the end of onboarding after saving the merchant ID/email.
*/
$redirect_url = apply_filters( 'woocommerce_paypal_payments_onboarding_redirect_url', admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway&ppcp-tab=ppcp-connection' ) );
$redirect_url = apply_filters( 'woocommerce_paypal_payments_onboarding_redirect_url', admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway&ppcp-tab=' . Settings::CONNECTION_TAB_ID ) );
if ( ! $this->settings->has( 'client_id' ) || ! $this->settings->get( 'client_id' ) ) {
$redirect_url = add_query_arg( 'ppcp-onboarding-error', '1', $redirect_url );
}