| @@ -65,12 +65,8 @@ | ||
| 65 | 65 | if ( false === $check ) { |
| 66 | 66 | wp_send_json_error( __( 'Invalid security token. Please reload the page and try again.', 'sharing-image' ), 403 ); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - if ( ! current_user_can( 'manage_options' ) ) { | |
| 70 | - wp_send_json_error( __( 'Sorry, you do not have permission to manage options for this site.', 'sharing-image' ), 403 ); | |
| 71 | - } | |
| 72 | - | |
| 73 | 69 | if ( empty( $_POST['sharing_image_key'] ) ) { |
| 74 | 70 | wp_send_json_error( __( 'Premium key is undefined.', 'sharing-image' ), 400 ); |
| 75 | 71 | } |
| 76 | 72 | |
| @@ -126,12 +122,8 @@ | ||
| 126 | 122 | $check = check_ajax_referer( Settings::SETTINGS_NONCE, 'sharing_image_nonce', false ); |
| 127 | 123 | |
| 128 | 124 | if ( false === $check ) { |
| 129 | 125 | wp_send_json_error( __( 'Invalid security token. Please reload the page and try again.', 'sharing-image' ), 403 ); |
| 130 | - } | |
| 131 | - | |
| 132 | - if ( ! current_user_can( 'manage_options' ) ) { | |
| 133 | - wp_send_json_error( __( 'Sorry, you do not have permission to manage options for this site.', 'sharing-image' ), 403 ); | |
| 134 | 126 | } |
| 135 | 127 | |
| 136 | 128 | // Remove license verification event. |
| 137 | 129 | wp_unschedule_hook( self::EVENT_PREMIUM ); |