src/Modules/Uninstall_feedback.php
function post_deactivate() {
		check_ajax_referer( (string) __CLASS__, 'nonce' );

		$this->post_deactivate_or_cancel();

		if ( empty( $_POST['id'] ) ) {

			wp_send_json( [] );

			return;
		}
		$this->call_api(
			array(
				'type'    => 'deactivate',
				'id'      => $_POST['id'],
				'comment' => isset( $_POST['msg'] ) ? $_POST['msg'] : '',
			)
		);
		wp_send_json( [] );

	}
function post_deactivate() {
		check_ajax_referer( (string) __CLASS__, 'nonce' );

		$this->post_deactivate_or_cancel();

		if ( empty( $_POST['id'] ) ) {

			wp_send_json( [] );

			return;
		}
		$this->call_api(
			array(
				'type'    => 'deactivate',
				'id'      => $_POST['id'],
				'comment' => isset( $_POST['msg'] ) ? $_POST['msg'] : '',
			)
		);
		wp_send_json( [] );

	}
function post_deactivate ( ) { check_ajax_referer ( ( string ) __CLASS__ , 'nonce' ) ; $ this -> post_deactivate_or_cancel ( ) ; if ( empty ( $ _POST [ 'id' ] ) ) { wp_send_json ( [ ] ) ; return ; } $ this -> call_api ( array ( 'type' => 'deactivate' , 'id' => $ _POST [ 'id' ] , 'comment' => isset ( $ _POST [ 'msg' ] ) ? $ _POST [ 'msg' ] : '' , ) ) ; wp_send_json ( [ ] ) ; }
Called when the deactivate button is clicked.
Called when the deactivate button is clicked .