Add support to allow in-app purchase installation after connected.
This commit is contained in:
parent
f687412acd
commit
aae802f319
|
@ -487,9 +487,10 @@ class WC_Admin_Addons {
|
|||
// so WCCOM "back" link returns user to where they were.
|
||||
$back_admin_path = add_query_arg( array() );
|
||||
return array(
|
||||
'wccom-site' => site_url(),
|
||||
'wccom-back' => esc_url( $back_admin_path ),
|
||||
'wccom-woo-version' => WC_VERSION,
|
||||
'wccom-site' => site_url(),
|
||||
'wccom-back' => esc_url( $back_admin_path ),
|
||||
'wccom-woo-version' => WC_VERSION,
|
||||
'wccom-helper-nonce' => wp_create_nonce( 'connect' ),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -799,6 +799,13 @@ class WC_Helper {
|
|||
WC_Tracker::send_tracking_data( true );
|
||||
}
|
||||
|
||||
// If connecting through in-app purchase, redirects back to WooCommerce.com
|
||||
// for product installation.
|
||||
if ( ! empty( $_GET['wccom-install-url'] ) ) {
|
||||
wp_redirect( wp_unslash( $_GET['wccom-install-url'] ) );
|
||||
exit;
|
||||
}
|
||||
|
||||
wp_safe_redirect(
|
||||
add_query_arg(
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue