|
@@ 1042-1044 (lines=3) @@
|
| 1039 |
|
} |
| 1040 |
|
|
| 1041 |
|
// optional additional params |
| 1042 |
|
if ( isset( $named_args['wpcom_user_id'] ) && ! empty( $named_args['wpcom_user_id'] ) ) { |
| 1043 |
|
$request_body['wpcom_user_id'] = $named_args['wpcom_user_id']; |
| 1044 |
|
} |
| 1045 |
|
|
| 1046 |
|
// override email of selected user |
| 1047 |
|
if ( isset( $named_args['wpcom_user_email'] ) && ! empty( $named_args['wpcom_user_email'] ) ) { |
|
@@ 1047-1049 (lines=3) @@
|
| 1044 |
|
} |
| 1045 |
|
|
| 1046 |
|
// override email of selected user |
| 1047 |
|
if ( isset( $named_args['wpcom_user_email'] ) && ! empty( $named_args['wpcom_user_email'] ) ) { |
| 1048 |
|
$request_body['user_email'] = $named_args['wpcom_user_email']; |
| 1049 |
|
} |
| 1050 |
|
|
| 1051 |
|
if ( isset( $named_args['plan'] ) && ! empty( $named_args['plan'] ) ) { |
| 1052 |
|
$request_body['plan'] = $named_args['plan']; |
|
@@ 1051-1053 (lines=3) @@
|
| 1048 |
|
$request_body['user_email'] = $named_args['wpcom_user_email']; |
| 1049 |
|
} |
| 1050 |
|
|
| 1051 |
|
if ( isset( $named_args['plan'] ) && ! empty( $named_args['plan'] ) ) { |
| 1052 |
|
$request_body['plan'] = $named_args['plan']; |
| 1053 |
|
} |
| 1054 |
|
|
| 1055 |
|
if ( isset( $named_args['onboarding'] ) && ! empty( $named_args['onboarding'] ) ) { |
| 1056 |
|
$request_body['onboarding'] = intval( $named_args['onboarding'] ); |
|
@@ 1055-1057 (lines=3) @@
|
| 1052 |
|
$request_body['plan'] = $named_args['plan']; |
| 1053 |
|
} |
| 1054 |
|
|
| 1055 |
|
if ( isset( $named_args['onboarding'] ) && ! empty( $named_args['onboarding'] ) ) { |
| 1056 |
|
$request_body['onboarding'] = intval( $named_args['onboarding'] ); |
| 1057 |
|
} |
| 1058 |
|
|
| 1059 |
|
if ( isset( $named_args['force_connect'] ) && ! empty( $named_args['force_connect'] ) ) { |
| 1060 |
|
$request_body['force_connect'] = intval( $named_args['force_connect'] ); |
|
@@ 1059-1061 (lines=3) @@
|
| 1056 |
|
$request_body['onboarding'] = intval( $named_args['onboarding'] ); |
| 1057 |
|
} |
| 1058 |
|
|
| 1059 |
|
if ( isset( $named_args['force_connect'] ) && ! empty( $named_args['force_connect'] ) ) { |
| 1060 |
|
$request_body['force_connect'] = intval( $named_args['force_connect'] ); |
| 1061 |
|
} |
| 1062 |
|
|
| 1063 |
|
if ( isset( $request_body['onboarding'] ) && (bool) $request_body['onboarding'] ) { |
| 1064 |
|
Jetpack::create_onboarding_token(); |