| @@ -249,9 +249,16 @@ | ||
| 249 | 249 | |
| 250 | 250 | update_user_meta( get_current_user_id(), self::INTRODUCTION_KEY, $user_introduction_meta ); |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + /** | |
| 254 | + * @throws \Exception | |
| 255 | + */ | |
| 253 | 256 | public static function register_as_beta_tester( array $data ) { |
| 257 | + if ( ! current_user_can( 'install_plugins' ) ) { | |
| 258 | + throw new \Exception( __( 'You do not have permissions to install plugins on this site.', 'elementor' ) ); | |
| 259 | + } | |
| 260 | + | |
| 254 | 261 | update_user_meta( get_current_user_id(), self::BETA_TESTER_META_KEY, true ); |
| 255 | 262 | $response = wp_safe_remote_post( |
| 256 | 263 | self::BETA_TESTER_API_URL, |
| 257 | 264 | [ |