Skip to content

Commit

Permalink
fix: remove unwanted code
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbir1991 committed Dec 12, 2018
1 parent fe695ef commit 857a3d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions includes/admin/class-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,13 @@ function handle_withdraw_action() {
*/
public function dismiss_christmas_offer() {
if ( ! current_user_can( 'manage_options' ) ) {
wp_send_json_error( __( 'You have no permission to do that', 'dokan' ) );
wp_send_json_error( __( 'You have no permission to do that', 'dokan-lite' ) );
}

if ( ! wp_verify_nonce( $_POST['nonce'], 'dokan_admin' ) ) {
wp_send_json_error( __( 'Invalid nonce', 'dokan' ) );
wp_send_json_error( __( 'Invalid nonce', 'dokan-lite' ) );
}

error_log( print_r( $_POST, true ) );

if ( ! empty( $_POST['dokan_christmas_dismissed'] ) ) {
$offer_key = 'dokan_christmas_notice';
update_option( $offer_key, 'hide' );
Expand Down

0 comments on commit 857a3d1

Please sign in to comment.