Skip to content

Commit 5a190e5

Browse files
committed
Remove duplicate code from a merge conflict - fixes phpstan issues.
1 parent 8b40661 commit 5a190e5

2 files changed

Lines changed: 0 additions & 8 deletions

File tree

classes/admin/class-page-settings.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ public function store_settings_form_options() {
136136
// Check the nonce.
137137
\check_admin_referer( 'progress_planner' );
138138

139-
if ( ! \current_user_can( 'manage_options' ) ) {
140-
\wp_send_json_error( [ 'message' => \esc_html__( 'You do not have permission to update settings.', 'progress-planner' ) ] );
141-
}
142-
143139
// Use check_ajax_referer instead of check_admin_referer for AJAX handlers.
144140
// check_admin_referer is designed for form submissions, not AJAX requests.
145141
if ( ! \check_ajax_referer( 'progress_planner', 'nonce', false ) ) {

classes/suggested-tasks/providers/class-email-sending.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,6 @@ public function ajax_test_email_sending() {
266266
// Check the nonce.
267267
\check_admin_referer( 'progress_planner' );
268268

269-
if ( ! $this->capability_required() ) {
270-
\wp_send_json_error( [ 'message' => \esc_html__( 'You do not have permission to test email sending.', 'progress-planner' ) ] );
271-
}
272-
273269
// Use check_ajax_referer for AJAX handlers.
274270
if ( ! \check_ajax_referer( 'progress_planner', 'nonce', false ) ) {
275271
\wp_send_json_error( [ 'message' => \esc_html__( 'Invalid nonce.', 'progress-planner' ) ] );

0 commit comments

Comments
 (0)